Example #1
0
        public ActionResult UserChangePassword()
        {
            userchangepasswordmodel objmodel   = new userchangepasswordmodel();
            ManageUserMaster        manageuser = new ManageUserMaster();

            usermaster usermst = manageuser.GetUserbyId(ProjectSession.UserId, ProjectSession.custid);

            objmodel = new userchangepasswordmodel(usermst);

            return(View(objmodel));
        }
Example #2
0
        public ActionResult UserChangePassword(userchangepasswordmodel model)
        {
            try
            {
                ManageUserMaster manageuser = new ManageUserMaster();

                if (ModelState.IsValid)
                {
                    manageuser.Changepassword(ProjectSession.UserId, model.usernewpwd, ProjectSession.custid);
                    ModelState.Clear();
                    usermastermodel model1 = new usermastermodel();
                    return(RedirectToAction("UserViewList"));
                }
            }
            catch
            {
                //return View(model);
                ViewBag.Error = "Sorry,Detail is not updated";
            }
            return(View(model));
        }