Beispiel #1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     goingBack();
     MainMenu win2 = new MainMenu();
     win2.Show();
     this.Close();
 }
Beispiel #2
0
 private void ck_click(object sender, RoutedEventArgs e)
 {
     String pass = password.Password;
     SqlConnection sqlConFill = new SqlConnection(conn);
     SqlCommand cmdFill = new SqlCommand();
     cmdFill.CommandText = "SELECT adm_password FROM prime WHERE Id = " + '1';
     cmdFill.Connection = sqlConFill;
     sqlConFill.Open();
     SqlDataReader rd = cmdFill.ExecuteReader();
     String cat = "";
     if (rd.HasRows)
     {
         rd.Read();
         cat = cat + rd[0].ToString();
         rd.Close();
     }
     sqlConFill.Close();
     if (cat == pass)
     {
         MainMenu win2 = new MainMenu();
         win2.Show();
         this.Close();
     }
     else
     {
         MessageBox.Show("Wrong Password", " ", MessageBoxButton.OK, MessageBoxImage.Error);
         password.Clear();
     }
 }
Beispiel #3
0
 private void logout_button_Click(object sender, RoutedEventArgs e)
 {
     MainMenu win2 = new MainMenu();
     win2.Show();
     this.Close();
 }