Esempio n. 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        StringBuilder strLog = new StringBuilder();

        try
        {
            //checkCode = Request["checkCode"];
            BesttoneAccount = Request["mobile"];
            //strLog.AppendFormat(String.Format("重置密码页面验证码:{0}", checkCode));
            //判断手机验证码
            //if (checkCode != null && !"".Equals(checkCode))
            //{
            //    Result = PhoneBO.SelSendSMSMassage("", BesttoneAccount, checkCode, out ErrMsg);
            //    if (Result != 0)
            //    {
            //        hintCode.InnerHtml = "手机验证码错误,请重新输入";  // 这里如何控制样式
            //        return;
            //    }
            //}
            //else
            //{
            //    hintCode.InnerHtml = "手机验证不能为空,请重新输入";  // 这里如何控制样式
            //    return;
            //}

            Linkage.BestTone.Interface.Rule.CustInfo custinfo = new Linkage.BestTone.Interface.Rule.CustInfo();
            Result = BesttoneAccountHelper.QueryCustInfo(BesttoneAccount, out custinfo, out ErrMsg);
            if (Result == 0)
            {
                if (custinfo != null)
                {
                    int ret = BesttoneAccountHelper.ResetBesttoneAccountPayPassword(BesttoneAccount, custinfo.IdType, custinfo.IdNo, custinfo.CustomerName, out ErrMsg);
                    if (ret == 0)
                    {
                        //提示密码重置成功
                        success = "0";
                        sendmsg = "支付密码已发送至" + BesttoneAccount;
                        //Response.Redirect(ReturnUrl);
                    }
                    else
                    {
                        Response.Redirect("ErrorInfo.aspx?ErrorInfo=" + ErrMsg);
                    }
                }
            }
            else
            {
                Response.Redirect("ErrorInfo.aspx?ErrorInfo=" + ErrMsg);
            }
        }
        catch (System.Exception ex)
        {
            log(ex.ToString());
        }
        finally
        {
            log(strLog.ToString());
        }
    }