public ActionResult Modify(string oldPassword, string newPassword, string confirmPassword) { UserInfo user = Commom.ReadUserInfo(); string strError = string.Empty; user.PassWord = Common.Basic_Func.JiaMi(oldPassword); User_Func func = new User_Func(); if (!func.UserLogin(ref user, ref strError)) { ViewData["errorMsg"] = "原始密码不正确!"; return(View("ModifyPassword")); } user.IsChangePwd = true; user.PassWord = Common.Basic_Func.JiaMi(newPassword); user.RePassword = Common.Basic_Func.JiaMi(confirmPassword); if (!func.ChangeUserPassword(user, ref strError)) { // 数据有误 ViewData["errorMsg"] = "修改密码失败:" + strError; return(View("ModifyPassword")); } else { // 数据有误 ViewData["errorMsg"] = "修改成功退出重新登陆!"; return(View("ModifyPassword")); } }
//public bool VerifyVersion(string FileVersion, string FileName, string path) //{ // AppVersion_Func func = new AppVersion_Func(); // return !func.VerifyVersion(FileVersion, FileName, path); //} //public bool VerifyAppVersion(ref AppVersionInfo appversion, ref string strError) //{ // AppVersion_Func func = new AppVersion_Func(); // return func.VerifyVersion(ref appversion, ref strError); //} public bool ChangeUserPassword(UserInfo user, ref string strError) { User_Func func = new User_Func(); return(func.ChangeUserPassword(user, ref strError)); }