예제 #1
0
 private void BoutonNewContact_Click(object sender, RoutedEventArgs e)
 {
     BLL.BLL BLL_AddContact = new BLL.BLL();
     if (NewContactFirtsName.Text.Trim().CompareTo("") != 0 || NewContactSecondName.Text.Trim().CompareTo("") != 0 || NewContactEmail.Text.Trim().CompareTo("") != 0 || NewContactPhone.Text.Trim().CompareTo("") != 0 || NewContactAge.Text.Trim().CompareTo("") != 0)
     {
         BLL_AddContact.AddNewContact(NewContactFirtsName.Text, NewContactSecondName.Text, NewContactEmail.Text, NewContactPhone.Text, NewContactAge.Text);
         NewContactFirtsName.Text  = "";
         NewContactSecondName.Text = "";
         NewContactEmail.Text      = "";
         NewContactPhone.Text      = "";
         NewContactAge.Text        = "";
         addContactMessage.Content = "Contact insert";
     }
     else
     {
         addContactMessage.Content = "Insert new contact informations";
     }
 }