コード例 #1
0
 /// <summary>
 /// 修改密码
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public ActionResult ChangePassword(ChangePasswordViewModel model)
 {
     ResponseModel response = new ResponseModel();
     Account account = _accountServie.GetById(model.Id);
     account.LoginPwd = model.Password.ToMd5String();
     _accountServie.Update(account);
     _unitOfWork.Commit();
     response.Msg = "重置密码成功!";
     response.Success = true;
     response.RedirectUrl = string.Empty;
     return Json(response, JsonRequestBehavior.AllowGet);
 }
コード例 #2
0
 public ActionResult ChangePassword(ChangePasswordViewModel model)
 {
     ResponseModel response = new ResponseModel();
     UserInfo user = _userInfoService.GetById(model.Id);
     user.Password = model.Password.ToMd5String();
     _userInfoService.Update(user);
     _unitOfWork.Commit();
     response.Msg = "重置密码成功!";
     response.Success = true;
     response.RedirectUrl = string.Empty;
     return Json(response, JsonRequestBehavior.AllowGet);
 }