Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can have a look on this code:</p> <p><strong>Add.cs</strong></p> <pre><code>public class Add { private List&lt;Childrendata&gt; children; //Create this List of Childrendata in Add.cs form public void CreateChildControls() // This is on Button click to create another from with controls { children = new List&lt;Childrendata&gt;(); // Call Add.cs form and pass the List AddChild obj = new AddChild(children); obj.StoreData(); } public void StoreInDB() // This is on final Submit to DB { if (new InsertAction().Insertchildren(children)) // Pass the same List of Childrendata to Save in DB { MessageBox.Show(" Children Insertion Happen "); } else { MessageBox.Show(" Children Insertion does not Happen "); } } } </code></pre> <p><strong>AddChild.cs</strong></p> <pre><code>public class AddChild { private List&lt;Childrendata&gt; m_children; public AddChild(List&lt;Childrendata&gt; children) { this.m_children = children; //Initialize the same List as sent by Mainform } public void AddControls() { } public void StoreData() // This is on Submit button click in child form to add new child details { for (int i = 0; i &lt; 10; i++) { // Filled with some dummy data Childrendata childdata = new Childrendata(); childdata.Childname = "skumar" + i; childdata.Childblood = "B" + i; childdata.Childbirth = "2013/10/"+ i; m_children.Add(childdata); // Add to same List } } } </code></pre> <p><strong>Childrendata.cs</strong></p> <pre><code> public class Childrendata { string childname, childblood, childbirth; public string Childbirth { get { return childbirth; } set { childbirth = value; } } public string Childblood { get { return childblood; } set { childblood = value; } } public string Childname { get { return childname; } set { childname = value; } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload