insert multiple rows to database looping
<p>what is wrong with this code what i am actually to achieve is
insert rows to database clear the textbox value and enter another record..
  the problem is at first loop data will be added successfully...but on the next iteration loops it will add empty strings to the rows of database but what i want is accept input from textbox and continue iterating...please try to read the code and help me ...it is been 2 weeks since am trying so solve this ..
again what i want to do
     -user enter number of group members
     - the group members have column like ,first name,last name gender,city.etc
  FOR all the group members (eg:6 group membrs) add 6 rows of of different column will be added
but my code does is add the first rows and the rest 5 row's will be empty data 
Soryy for my bad english..somebody please try to think what i am thinking</p>

<pre><code>    {{
        private void btnAddloan_Click(object sender, RoutedEventArgs e)    

            if (txtname.Text != "" &amp;&amp; txtlname.Text != "")
            {
                int c=0;
                int input=int.Parse(txttotalnumberofgroupmembers.Text);

                do
                {
                    string connstr = "Data Source=GER-PC\\PLEASEGOD;Initial Catalog=ACSI;Integrated Security=True";
                    SqlConnection con = new SqlConnection(connstr);
                    con.Open();

                    SqlCommand cmd = new SqlCommand("insert into Customer(FirstName,LastName)  values(@n,@p)", con);
                    cmd.Parameters.AddWithValue("@p", txtname.Text);
                    cmd.Parameters.AddWithValue("@n", txtlname.Text);
                    cmd.ExecuteNonQuery();
                    con.Close();
                    lblnotify.Content = c + 1 + "" + "members added";
                     //clear textbox values and wait for another input
                    txtname.Text = "";
                    txtlname.Text = "";

                    if (txtname.Text != "" &amp;&amp; txtlname.Text != "")
                   {
                      continue;

                   }
                  else
                   {

                        MessageBoxResult result =MessageBox.Show("procces","Continue Adding Memebers",MessageBoxButton.YesNoCancel,MessageBoxImage.Warning);
                        //txtname.Text = s;
                        //txtlname.Text= s1;
                         //MessageBox.Show();
                        switch (result)
                        {
                            case MessageBoxResult.Yes:
                                if (txtname.Text != "")
                                {

                                }
                                else
                                {


                                }
                                break;
                            case MessageBoxResult.No:
                                break;
                            case MessageBoxResult.Cancel:
                                break;

                        }

                   }
                   c++;
                } while (c &lt; input);


            }
            else
            {
                MessageBox.Show("plese fill first name and last name");

            }


                } 
</code></pre>
