public ActionResult Edit(EditUser model) { if (ModelState.IsValid) { User user = userService.GetUserById(model.Id); user.Password = model.Password; userService.UpdateUser(user); return RedirectToAction("Index").AndNotice("密码修改成功!"); } return View(model); }
//修改密码 public ActionResult Edit(int id) { EditUser editUser = new EditUser(); editUser.Id = id; return View(editUser); }