示例#1
0
 public ActionResult Changeuserpassword(ChangePasswordModel model)
 {
     ModelState.Remove("RoleId");
     if (ModelState.IsValid)
     {
         model.UserName   = model.UserNamePassword.DecryptParameter();
         model.ActionUser = Session["UserName"].ToString();
         model.IpAddress  = ApplicationUtilities.GetIP();
         //model.BrowserInfo = ApplicationUtilities.GetBrowserInfo();
         var common            = model.MapObject <shared.Models.User.ChangePasswordCommon>();
         CommonDbResponse resp = buss.ChangeUserPassword(common);//.SetMessageInTempData(this);
         if (resp.Code == ResponseCode.Success)
         {
             this.ShowPopup(0, "Password Changed Successfully!!");
             //resp.SetMessageInTempData(this);
             return(RedirectToAction("Index"));
         }
     }
     this.ShowPopup(1, "Something went wrong!!");
     return(RedirectToAction("Index"));
 }