private void LogIn_Click(object sender, RoutedEventArgs e) { string hashedPassword = Hashing.HashPassword(Password.Password); if (DBConnection.verifiedLogIn(Username.Text, hashedPassword)) { LogInInformation.Username = Username.Text; if (DBConnection.verifiedAccountType(Username.Text)) { Admin_MainMenu adminMainMenu = new Admin_MainMenu(); adminMainMenu.Show(); this.Close(); } else { FillOut fillOut = new FillOut(); fillOut.Show(); this.Close(); } } else { VerifyInfo.Content = "Your username or password is incorrect"; } }
private void Back_Click(object sender, RoutedEventArgs e) { if (isEdit) { if (!isSave) { MessageBoxResult result = MessageBox.Show("Your data is unsave. Do you want to go back ?", "Unsaved Data", MessageBoxButton.YesNo, MessageBoxImage.Warning); if (result == MessageBoxResult.Yes) { DataTable.IsReadOnly = true; } else { return; } } } Admin_MainMenu adminMainMenu = new Admin_MainMenu(); adminMainMenu.Show(); this.Close(); }