//[RequireHttps] public HttpResponseMessage Post([FromBody] user details) { var q = UserLogin.ChangePassword(details.username, details.password); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, q); return(response); }
public ActionResult ChangePassword(int idUser) { var strRes = ""; UserLogin Login = new UserLogin(); strRes = Login.ChangePassword(idUser); return(Content(strRes)); }
public ActionResult ChangePassword(UserViewModel userModel) { userModel.UserName = Convert.ToString(Session["UserName"]); userModel.UserType = (UserType)Enum.Parse(typeof(UserType), Convert.ToString(Session["UserType"])); var userLogin = new UserLogin(); var user = new User(); user.UserName = userModel.UserName; user.Password = userModel.ConfirmPassword; user.UserType = userModel.UserType; var isPasswordChanged = userLogin.ChangePassword(user); ViewBag.IsPasswordChanged = true; return(View()); }