private void changePassBTN_Click(object sender, RoutedEventArgs e) { if (oldPassTB.Text == CurrentUser.getPassword()) { if (confirmPassTB.Text == NewpassTB.Text) { confirmLBL.Content = ""; DataBaseTools.UpdateUserPassword(CurrentUser.getID(), confirmPassTB.Text); System.Windows.MessageBox.Show("Password Changed", "Info"); Close(); } else { confirmLBL.Content = "Confirmation password dosen't match the password"; } } else { System.Windows.MessageBox.Show("Worng password", "Info"); } }