private void ExecuteForgotPassword(object obj) { try { if (string.IsNullOrEmpty(CustomerId)) { ResetPasswordStatusMessage = "Please fill out customer id!"; return; } if (string.IsNullOrEmpty(UserName)) { ResetPasswordStatusMessage = "Please fill out username!"; return; } _userSession.AttachUserNameAndCustomerId(UserName, CustomerId); if (_userService.ResetPassword(_userSession.LoginSettings)) { ResetPasswordStatusMessage = "Password successfully reset. An email has been sent to your e-mail address with the new password"; } else { ResetPasswordStatusMessage = "Password could not be reset. Please check that your username is spelled correctly"; } } catch (Exception ex) { ResetPasswordStatusMessage = ex.Message; } }