<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How to set a Value in a column in a repeating table Programatically C#</title><link>https://www.infopathdev.com:443/forums/thread/90225.aspx</link><pubDate>Wed, 29 May 2013 15:42:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:90225</guid><dc:creator>j0rt3g4</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/90225.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=90225</wfw:commentRss><description>&lt;p&gt;Thanks you very much for your reply&lt;/p&gt;&lt;p&gt;&amp;nbsp;Yes, Detalle is the repeating group. &lt;/p&gt;&lt;p&gt;I didn&amp;#39;t have Thought about that error validation with the &amp;quot;,&amp;quot; instead of a &amp;quot;.&amp;quot; &lt;/p&gt;&lt;p&gt;But I changed the calculated value with a Textbox and it executed correctly. I don&amp;#39;t think I should&amp;nbsp;&amp;nbsp;add the nil attribute again.&lt;/p&gt;&lt;p&gt;This should be my first time using the XpathNodeIterator and I have no idea how to use it, Can i have a clue how to use this XPathNodeIterator?&lt;/p&gt;&lt;p&gt;I will let you know if it&amp;#39;s Works&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to set a Value in a column in a repeating table Programatically C#</title><link>https://www.infopathdev.com:443/forums/thread/90221.aspx</link><pubDate>Wed, 29 May 2013 14:40:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:90221</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/90221.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=90221</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;You&amp;#39;ll want to look into &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.xpath.xpathnodeiterator.aspx"&gt;XPathNodeIterator&lt;/a&gt; - I&amp;#39;m guessing Detalle is your repeating group - get those and iterate through with a foreach.&lt;/p&gt;&lt;p&gt;I think your validation error may be that your value is using a comma for the decimal separator? I think XML will find that invalid - &lt;a href="http://www.w3.org/TR/xmlschema-2/#decimal"&gt;http://www.w3.org/TR/xmlschema-2/#decimal&lt;/a&gt;&lt;/p&gt;&lt;p&gt;You can set the control to display with a comma instead of a &amp;quot;.&amp;quot;, but you&amp;#39;ll need to set the field with a value with a &amp;quot;.&amp;quot;&lt;/p&gt;&lt;p&gt;Looks like Decimal.TryParse can take an IFormatProvider? That may be worth a shot... &lt;a href="http://msdn.microsoft.com/en-us/library/ew0seb73.aspx"&gt;http://msdn.microsoft.com/en-us/library/ew0seb73.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>How to set a Value in a column in a repeating table Programatically C#</title><link>https://www.infopathdev.com:443/forums/thread/90219.aspx</link><pubDate>Wed, 29 May 2013 13:18:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:90219</guid><dc:creator>j0rt3g4</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/90219.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=90219</wfw:commentRss><description>&lt;div&gt;Hello there &lt;/div&gt;

&lt;div&gt;I&amp;#39;ve got this code but it has 2 problems:&lt;/div&gt;
&lt;div&gt;1. The double value gets and &amp;quot;Only numeric fields are allowed&amp;quot;  &lt;/div&gt;
&lt;div&gt;2. I can&amp;#39;t find the way to repeat calculate throught all rows in the table... &lt;/div&gt;

&lt;div&gt;Heres the code:&lt;/div&gt;
&lt;div&gt; public void cambios(){&lt;/div&gt;
&lt;div&gt;            //Navegacion entre campos&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;            XPathNavigator navform = this.CreateNavigator(); //navegador de formulario&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;            XmlNamespaceManager SpaceManager = this.NamespaceManager; //manejador de espacio de nombres&lt;/div&gt;
&lt;div&gt;            XPathNavigator inicio = navform.SelectSingleNode(&amp;quot;/my:myFields/my:Vacaciones/my:Detalle/my:Inicio&amp;quot;, SpaceManager);&lt;/div&gt;
&lt;div&gt;            XPathNavigator culminacion = navform.SelectSingleNode(&amp;quot;/my:myFields/my:Vacaciones/my:Detalle/my:Culminacion&amp;quot;, SpaceManager);&lt;/div&gt;
&lt;div&gt;            XPathNavigator Tiempo = navform.SelectSingleNode(&amp;quot;/my:myFields/my:Vacaciones/my:Detalle/my:Tiempo&amp;quot;, SpaceManager);&lt;/div&gt;
&lt;div&gt;            XPathNavigator Dias = navform.SelectSingleNode(&amp;quot;/my:myFields/my:Vacaciones/my:Detalle/my:Dias&amp;quot;, SpaceManager);&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;            DeleteNil(inicio);&lt;/div&gt;
&lt;div&gt;            DeleteNil(culminacion);&lt;/div&gt;
&lt;div&gt;            DeleteNil(Tiempo);&lt;/div&gt;
&lt;div&gt;            DeleteNil(Dias);&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;            int SWcombos = Tiempo.ValueAsInt; //el valor del combo segun selección&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;            DateTime di = new DateTime(); &lt;/div&gt;
&lt;div&gt;            DateTime df = new DateTime();&lt;/div&gt;
&lt;div&gt;            string ConvDias; //Conversion Dias&lt;/div&gt;
&lt;div&gt;            if ((string.IsNullOrEmpty(inicio.Value) || (string.IsNullOrEmpty(culminacion.Value))))&lt;/div&gt;
&lt;div&gt;            {&lt;/div&gt;
&lt;div&gt;           //     MessageBox.Show(&amp;quot; Los campos de Inicio y Culminación deben tener fechas válidas para realizar el cálculo &amp;quot;);&lt;/div&gt;
&lt;div&gt;             //   return;&lt;/div&gt;
&lt;div&gt;            }&lt;/div&gt;
&lt;div&gt;            else&lt;/div&gt;
&lt;div&gt;            {&lt;/div&gt;
&lt;div&gt;                di = inicio.ValueAsDateTime;&lt;/div&gt;
&lt;div&gt;                df = culminacion.ValueAsDateTime;&lt;/div&gt;
&lt;div&gt;            }&lt;/div&gt;
&lt;div&gt;            //public int ExcluyeFeriados(DateTime start, DateTime end, int dias)&lt;/div&gt;
&lt;div&gt;            &lt;/div&gt;
&lt;div&gt;            double dias = ExcluyeFeriados(di, df);&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;            if (dias &lt;/div&gt;
&lt;div&gt;            {&lt;/div&gt;
&lt;div&gt;                MessageBox.Show(&amp;quot;La fecha de inicio no puede estar ANTES de la fecha de Culminación&amp;quot;);&lt;/div&gt;
&lt;div&gt;                Dias.SetValue(&amp;quot;0&amp;quot;);&lt;/div&gt;
&lt;div&gt;                return;&lt;/div&gt;
&lt;div&gt;            }&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;            switch (SWcombos)&lt;/div&gt;
&lt;div&gt;   {&lt;/div&gt;
&lt;div&gt;                case 1:&lt;/div&gt;
&lt;div&gt;                    //calcular los dias&lt;/div&gt;
&lt;div&gt;                    //MessageBox.Show(&amp;quot;Hice 1&amp;quot;);&lt;/div&gt;
&lt;div&gt;                    ConvDias =    Convert.ToString(dias);&lt;/div&gt;
&lt;div&gt;                    Dias.SetValue(ConvDias );&lt;/div&gt;&lt;/div&gt;
&lt;div&gt;                    break;&lt;/div&gt;
&lt;div&gt;                case 2: //caso 2 y 3 son el mismo, medios días, o tarde o mañana&lt;/div&gt;
&lt;div&gt;                case 3:&lt;/div&gt;
&lt;div&gt;                    dias *= 0.5; //son medios dias)&lt;/div&gt;
&lt;div&gt;                    ConvDias = Convert.ToString(dias);&lt;/div&gt;
&lt;div&gt;                    //calcular dias y mult por la mitad (porque son medios días) ---&amp;gt;Caso Mañanas&lt;/div&gt;
&lt;div&gt;                    //MessageBox.Show(&amp;quot;Hice 2 y 3&amp;quot;);&lt;/div&gt;
&lt;div&gt;                    Dias.SetValue(ConvDias);&lt;/div&gt;
&lt;div&gt;                    break;&lt;/div&gt;
&lt;div&gt;                default:&lt;/div&gt;
&lt;div&gt;                    //No es un número valido dar error y salir&lt;/div&gt;
&lt;div&gt;                    MessageBox.Show(&amp;quot;No tiene un valor válido, favor contacte al departamento de sistemas a email&amp;quot;);&lt;/div&gt;
&lt;div&gt;                    Dias.SetValue(&amp;quot;0&amp;quot;);&lt;/div&gt;
&lt;div&gt;                    break;&lt;/div&gt;
&lt;div&gt;            }&lt;/div&gt;
&lt;div&gt;        }&lt;/div&gt;

&lt;div&gt;&lt;a href="http://imageshack.us/photo/my-images/46/sinttulogxx.png/" target="_blank" title="http://imageshack.us/photo/my-images/46/sinttulogxx.png/"&gt;&lt;img src="http://img46.imageshack.us/img46/1778/sinttulogxx.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;Thanks in advance......&lt;/div&gt;</description></item></channel></rss>