Ejemplo n.º 1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (txtboxConnStr.Text.Length == 0 || txtboxName.Text.Length == 0 || txtboxSurname.Text.Length == 0 || txtboxAge.Text.Length == 0 || txtboxLocation.Text.Length == 0)
     {
         MessageBox.Show("Please enter requested textboxes", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         ServiceReference1.WebService1SoapClient client = new WebService1SoapClient();
         client.AddData(txtboxConnStr.Text, txtboxName.Text, txtboxSurname.Text, int.Parse(txtboxAge.Text), txtboxLocation.Text);
         txtboxName.Text     = "";
         txtboxSurname.Text  = "";
         txtboxAge.Text      = "";
         txtboxLocation.Text = "";
     }
 }