Esempio n. 1
0
  private void Button_Click(object sender, RoutedEventArgs e)
  {
       if ((UserNametxt.Text == "") || (UserNametxt.Text == "") || (PasswordTxt.Password == "") || (adresstxt.Text == "") || (phnetxt.Text == "") || (emailtxt.Text == "") || (Nictxt.Text == ""))
       {
           MessageBox.Show("Enter Complete Information");
       }
       else
       {
           Customer cus = new Customer(UserNametxt.Text, PasswordTxt.Password, adresstxt.Text, phnetxt.Text, emailtxt.Text, Nictxt.Text, Gender.SelectedItem.ToString(), AgeTxt.Text);
           ServiceReference1.ServiceClient clientfortesting = new ServiceReference1.ServiceClient();
           clientfortesting.CustomerRegistrationRequestCompleted += new EventHandler<ServiceReference1.CustomerRegistrationRequestCompletedEventArgs>(CustomerRegistrationRequestReturnFunction);
           clientfortesting.CustomerRegistrationRequestAsync(cus.username,cus.password,cus.email,cus.PhoneNumber,cus.NIC,cus.address,cus.Gender,cus.age);
       }
 
  }