public IHttpActionResult GetChangepass(string mail, string pwdNew) { var item = Repositories.ChangePwd(mail, pwdNew); if (item > 0) { return(Ok(item)); } return(InternalServerError()); }
public ActionResult ChangePwd(string mail, string oldPwd, string newPwd) { if (Repositories.ChangePwd(mail, oldPwd, newPwd) == true) { TempData["success"] = "Change password successfully!"; } else { TempData["error"] = "Change password failed!"; } return(RedirectToAction("PersonalInfo", new { id = Session["ID"] })); }
public bool ChangePwd(int idUser, string pwdOld, string pwdNew) { return(Repositories.ChangePwd(idUser, pwdOld, pwdNew)); }