Пример #1
0
        private void back_Click(object sender, RoutedEventArgs e)
        {
            AdminMain mm = new AdminMain();

            mm.Show();
            Close();
        }
Пример #2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (Auth.authC(username.Text, password.Password) == true)
     {
         LGS.CurrentID(username.Text, password.Password);
         Clients cl = LGS.GetCurrentID();
         SaveCLID.CLID = cl.id_user;
         if (cl.block == 1)
         {
             MessageBox.Show("Клиент заблокирован!");
         }
         else if (cl.block == 0)
         {
             ClientMain ms = new ClientMain();
             this.Close();
             ms.Show();
         }
     }
     else if (Auth.authM(username.Text, password.Password) == true)
     {
         LGS.MasterID(username.Text, password.Password);
         MasterMain ms = new MasterMain();
         this.Close();
         ms.Show();
     }
     else if (Auth.authA(username.Text, password.Password) == true)
     {
         AdminMain ms = new AdminMain();
         this.Close();
         ms.Show();
     }
     else if (Auth.authMan(username.Text, password.Password) == true)
     {
         ManagerMain ms = new ManagerMain();
         this.Close();
         ms.Show();
     }
     else
     {
         MessageBox.Show("Логин или пароль неверны!");
     }
 }