Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Message umsg = accountsFacade.GetUserSecurityByUserID(Fetch.GetUserCookie().UserID);
                if (umsg.Success)
                {
                    AccountsProtect protect = umsg.EntityList[0] as AccountsProtect;
                    lblQuestion1.Text = protect.Question1;
                    lblQuestion2.Text = protect.Question2;
                    lblQuestion3.Text = protect.Question3;

                    this.form1.Visible    = true;
                    this.form2.Visible    = false;
                    this.divRight.Visible = false;
                }
                else
                {
                    this.form1.Visible      = false;
                    this.form2.Visible      = false;
                    this.divRight.Visible   = true;
                    this.divRight.InnerHtml = "<div class=\"Uerror\">您还没有申请密码保护功能,请先<a href='/Member/ApplyProtect.aspx'>申请密保</a></div>";
                }
            }

            Themes.Standard.Common_Header sHeader = (Themes.Standard.Common_Header) this.FindControl("sHeader");
            sHeader.title = "会员中心";
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Message msg = accountsFacade.GetUserSecurityByUserID(Fetch.GetUserCookie().UserID);
                if (msg.Success)
                {
                    AccountsProtect protect = msg.EntityList[0] as AccountsProtect;
                    this.lblQuestion1.Text = protect.Question1;
                    this.lblQuestion2.Text = protect.Question2;
                    this.lblQuestion3.Text = protect.Question3;
                }
                else
                {
                    switch (msg.MessageID)
                    {
                    case 4:
                        ShowAndRedirect("您还没有申请“密码保护”功能,请先申请!", "/Member/ApplyProtect.aspx");
                        break;

                    default:
                        Show(msg.Content);
                        break;
                    }
                }

                Message umsg = accountsFacade.GetUserGlobalInfo(Fetch.GetUserCookie().UserID, 0, "");
                if (umsg.Success)
                {
                    UserInfo userInfo = umsg.EntityList[0] as UserInfo;
                    if (userInfo.MoorMachine == 0)
                    {
                        this.btnUpdate.Text = "申请绑定";
                    }
                    else
                    {
                        this.btnUpdate.Text = "取消绑定";
                    }
                }
            }

            Themes.Standard.Common_Header sHeader = (Themes.Standard.Common_Header) this.FindControl("sHeader");
            sHeader.title = "会员中心";
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Message umsg = accountsFacade.GetUserSecurityByUserID(Fetch.GetUserCookie( ).UserID);
                if (umsg.Success)
                {
                    this.form1.Visible    = false;
                    this.divRight.Visible = true;
                }
                else
                {
                    this.divRight.Visible = false;
                }

                BindProtectQuestion( );
            }

            Themes.Standard.Common_Header sHeader = (Themes.Standard.Common_Header) this.FindControl("sHeader");
            sHeader.title = "会员中心";
        }
Exemplo n.º 4
0
        private void GetUserSecurityInfo(int userId)
        {
            Message umsg = accountsFacade.GetUserSecurityByUserID(userId);

            if (umsg.Success)
            {
                AccountsProtect protect = umsg.EntityList[0] as AccountsProtect;

                this.lblQuestion1.Text = protect.Question1;
                this.lblQuestion2.Text = protect.Question2;
                this.lblQuestion3.Text = protect.Question3;
            }
            else
            {
                this.form1.Visible = false;

                this.divRight.Visible   = true;
                this.divRight.InnerHtml = "<div class=\"Uerror\" style=\"width:450px;\">抱歉,此账号还没有申请密码保护功能,不能重置登录密码!</div>";
                return;
            }

            this.form1.Visible = false;
            this.form2.Visible = true;
        }