Exemple #1
0
        protected void btnChangeZij_Click(object sender, EventArgs e)
        {
            //修改资金密码
            if (string.IsNullOrEmpty(this.txtCode.Text.Trim()))
            {
                return;
            }
            if (string.IsNullOrEmpty(this.txtZiJPwd.Text.Trim()))
            {
                JsAlert("请填写资金密码!");
                return;
            }
            if (this.txtZiJPwd.Text.Trim() != this.txtZiJRePwd.Text.Trim())
            {
                JsAlert("两次资金密码不一致!");
                return;
            }

            ISysUserBalanceService userService = IoC.Resolve <ISysUserBalanceService>();
            ISysUserService        users       = IoC.Resolve <ISysUserService>();
            var uinfo = users.Get(this.txtCode.Text.Trim());

            if (uinfo == null)
            {
                JsAlert("非法请求");
            }

            if (userService.UpdateManUserBalancePwd(uinfo.Id, this.txtZiJPwd.Text.Trim()))
            {
                JsAlert("登陆密码修改成功!");
            }
            else
            {
                JsAlert("登陆密码修改失败!");
            }
        }