Ejemplo n.º 1
0
 private void LinkChangePass_Click(object sender, EventArgs e)
 {
     try
     {
         UserResetPasswordForm resetPasswordForm = new UserResetPasswordForm(this.user);
         resetPasswordForm.ShowDialog();
     }
     catch (Exception ex)
     {
         ex.ShowDialog();
     }
 }
Ejemplo n.º 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();
     }
 }