public ActionResult HChangPassword(string oldPassword, string newPassword) { var MemberId = Guid.Empty; if (Session["User"] != null) { string UserModel = Session["User"].ToString(); MemberId = new Guid(UserModel.Split('|')[1]); } if (MemberId == Guid.Empty) { return(RedirectToAction("Login", "Account")); } if (string.IsNullOrEmpty(newPassword)) { return(Content("请输入你的新密码!")); } if (USer.ChangPassword(newPassword, MemberId) == true) { return(Content("1")); } else { return(Content("0")); } }