private void Btn_SignInClick(object sender, RoutedEventArgs e)
 {
     using (Service1Client service1Client = new Service1Client())
     {
         bool Chak = service1Client.LogIn(txt_Login.Text, txt_Password.Password);
         if (Chak == true)
         {
             ModelClient client = service1Client.GetClient(txt_Login.Text, txt_Password.Password);
             if (client != null)
             {
                 WorkWindow workWindow = new WorkWindow(client);
                 workWindow.Show();
                 Close();
             }
             else
             {
                 MessageBox.Show("Виникла помилка))))");
             }
         }
         else
         {
             MessageBox.Show("Не праавильно ввеедений логін, або пароль");
         }
     }
 }
Beispiel #2
0
 private void Btn_SignInClick(object sender, RoutedEventArgs e)
 {
     using (Service1Client service1Client = new Service1Client())
     {
         bool Chak = service1Client.LogIn(txt_Login.Text, txt_Password.Password);
         if (Chak == true)
         {
             ModelClient client = service1Client.GetClient(txt_Login.Text, txt_Password.Password);
             if (client != null)
             {
                 WorkWindow workWindow = new WorkWindow(client);
                 workWindow.Show();
                 Close();
             }
             else
             {
                 MessageBox.Show("Error");
             }
         }
         else
         {
             MessageBox.Show("Login or pass failed");
         }
     }
 }
Beispiel #3
0
 private void btn_EditClient_Click(object sender, RoutedEventArgs e)
 {
     if (String.IsNullOrEmpty(txt_Name.Text))
     {
         txt_Name.Focus();
     }
     else if (String.IsNullOrEmpty(txt_SurName.Text))
     {
         txt_SurName.Focus();
     }
     else if (String.IsNullOrEmpty(txt_Email.Text))
     {
         txt_Email.Focus();
     }
     else if (String.IsNullOrEmpty(txt_Phone.Text))
     {
         txt_Phone.Focus();
     }
     else if (String.IsNullOrEmpty(txt_Country.Text))
     {
         txt_Country.Focus();
     }
     else if (String.IsNullOrEmpty(txt_City.Text))
     {
         txt_City.Focus();
     }
     else if (String.IsNullOrEmpty(txt_Street.Text))
     {
         txt_Street.Focus();
     }
     else
     {
         ModelClient m = new ModelClient();
         m.Id      = modelClient.Id;
         m.Name    = txt_Name.Text;
         m.SurName = txt_SurName.Text;
         m.Phone   = txt_Phone.Text;
         m.Email   = txt_Email.Text;
         m.Country = txt_Country.Text;
         m.City    = txt_City.Text;
         m.Street  = txt_Street.Text;
         Service1Client service1Client = new Service1Client();
         service1Client.EditClient(m);
         WorkWindow workWindow = new WorkWindow(m);
         workWindow.Show();
         Close();
     }
 }
Beispiel #4
0
 private void btn_SetDocClick(object sender, RoutedEventArgs e)
 {
     if (String.IsNullOrEmpty(txt_DocName.Text))
     {
         txt_DocName.Focus();
     }
     else if (String.IsNullOrEmpty(txt_DocStatus.Text))
     {
         txt_DocStatus.Focus();
     }
     else
     {
         Client.DoctorName    = txt_DocName.Text;
         Client.DoctoorStatus = txt_DocStatus.Text;
         using (Service1Client service1Client = new Service1Client())
         {
             service1Client.AddDocToClient(Client);
         }
         WorkWindow workWindow = new WorkWindow(Client);
         workWindow.Show();
         Close();
     }
 }