예제 #1
0
 private void LinkChangePass_Click(object sender, EventArgs e)
 {
     try
     {
         UserResetPasswordForm resetPasswordForm = new UserResetPasswordForm(this.user);
         resetPasswordForm.ShowDialog();
     }
     catch (Exception ex)
     {
         ex.ShowDialog();
     }
 }
예제 #2
0
 private void LinkChangePass_Click(object sender, System.EventArgs e)
 {
     try
     {
         if (!string.IsNullOrWhiteSpace(this.txtUsername.Text))
         {
             var users = new UserRepository().GetAll();
             var user  = users?.FirstOrDefault(x => x.Username.Equals(this.txtUsername.Text));
             if (user == null)
             {
                 throw new Exception("Debe espesificar un usuario valido");
             }
             UserResetPasswordForm resetPasswordForm = new UserResetPasswordForm(user);
             resetPasswordForm.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         ex.ShowDialog();
     }
 }