Example #1
0
 public vmUser_ChangePassword()
 {
     Credentials = new vmUser_SetPassword();
 }
Example #2
0
 public ActionResult SetPassword(int id)
 {
     var sp = new vmUser_SetPassword {UserId = id, Username = UserService.GetUserById(id).UserName};
     return View(sp);
 }
Example #3
0
 public ActionResult SetPassword(vmUser_SetPassword sp)
 {
     if (ModelState.IsValid)
     {
         ServiceResult result = UserService.UpdatePassword(sp.UserId, sp.NewPassword);
         if (result.Success)
         {
             DisplayMessageToUser(new DisplayMessage(DisplayMessageType.SuccessMessage, "Password has been updated successfully"));
             return RedirectToAction("Edituser", new { id = sp.UserId });
         }
         Utilities.AddModelStateErrors(ModelState, result.GetServiceErrors());
     }
     return View(sp);
 }
 public vmUser_ChangePassword()
 {
     Credentials = new vmUser_SetPassword();
 }