Ejemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            WorkerMain workerMain = new WorkerMain();

            workerMain.Show();
            this.Close();
        }
Ejemplo n.º 2
0
 private void Button_Click_2(object sender, RoutedEventArgs e)
 {
     if (new SqlCommands().connection("SELECT user.id FROM  user WHERE login = '******' AND password = '******' LIMIT 1"))
     {
         if (new SqlCommands().takeRole() == 1)
         {
             ClientMain clientMain = new ClientMain();
             clientMain.Show();
             this.Close();
         }
         else
         {
             WorkerMain workerMain = new WorkerMain();
             workerMain.Show();
             this.Close();
         }
     }
     else
     {
         MessageBox.Show("Проверьте правильность введенных данных");
     }
 }