Example #1
0
        public ActionResult ChangePassword(ChangePasswordModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }
            string id     = model.id;
            var    result = UserInfoRepo.ChangePassword(Request["id"].ToString(), model.NewPassword);

            if (result.HasError)
            {
                ViewBag.Error = result.Message;
                return(View(model));
            }
            ViewBag.Success = "Your password has been changed successfully";
            return(View(model));
        }