Пример #1
0
 public static bool ChangePassword(User user)
 {
     try
     {
         using (var dlg = new dlgPassword(user))
         {
             if (dlg.ShowDialog() == DialogResult.OK)
             {
                 UpdatePassword(user, dlg.txtNewPassword.Text.Trim());
                 return(true);
             }
             return(false);
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #2
0
 public static void ChangePassword()
 {
     try
     {
         using (var dlg = new dlgPassword())
         {
             if (dlg.ShowDialog() == DialogResult.OK)
             {
                 var User = (AppUser)dlg.cbUserName.SelectedItem;
                 UpdatePassword(User, dlg.txtNewPassword.Text.Trim());
             }
             else
             {
                 return;
             }
         }
         ChangePassword();
     }
     catch (Exception)
     {
         throw;
     }
 }