コード例 #1
0
ファイル: dashboard.xaml.cs プロジェクト: sumit10/BMS
 private void changepassword(object sender, System.Windows.RoutedEventArgs e)
 {
     if (pd_oldpass.Password.Trim().ToString() == "" || pd_newpass.Password.Trim().ToString() == "" || pb_comform.Password.Trim().ToString() == "")
     {
         MessageBox.Show("Please fill all field");
         return;
     }
     if (pd_newpass.Password.Trim().ToString() != pb_comform.Password.Trim().ToString())
     {
         MessageBox.Show("New Password and confirm password does not match");
         return;
     }
     loginmodel l = new loginmodel();
     if (l.update(1,pd_oldpass.Password.Trim().ToString(),pd_newpass.Password.Trim().ToString()))
     {
         MessageBox.Show("Password Changed Sucessfully");
     }
 }