Beispiel #1
0
        public JsonResult ModifyPassWord(string pwd, string againpwd)
        {
            bool result = false;

            if (string.IsNullOrEmpty(pwd) || string.IsNullOrEmpty(againpwd))
            {
                return(new CustomerJsonResult(new ResponseResult {
                    code = ResponseHelper.ORPARAMCODE, msg = "密码和确认密码不能为空"
                }));
            }
            if (pwd != againpwd)
            {
                return(new CustomerJsonResult(new ResponseResult {
                    code = ResponseHelper.ORPARAMCODE, msg = "两次输入密码不一致"
                }));
            }
            result = ISysUserService.UpdatePwd("UserCode", UserInfo.UserCode, DESEncryptHelper.GetMd5Hash(pwd));
            if (result)
            {
                return(new CustomerJsonResult(new ResponseResult {
                    code = ResponseHelper.ESUCCESSCODE, msg = "状态操作成功"
                }));
            }
            else
            {
                return(new CustomerJsonResult(new ResponseResult {
                    code = ResponseHelper.FAILCODE, msg = "状态操作失败"
                }));
            }
        }