protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Message umsg = accountsFacade.GetUserGlobalInfo(Fetch.GetUserCookie().UserID, 0, "");
                if (umsg.Success)
                {
                    UserInfo user = umsg.EntityList[0] as UserInfo;
                    this.lblAccounts.Text        = user.Accounts;
                    this.lblExchangeLoves.Text   = user.Present.ToString();
                    this.lblGameID.Text          = user.GameID.ToString();
                    this.lblTotalLoves.Text      = user.LoveLiness.ToString();
                    this.lblUnExchangeLoves.Text = (user.LoveLiness - user.Present).ToString();

                    this.txtPresent.Text = (user.LoveLiness - user.Present).ToString();
                }

                GameScoreInfo scoreInfo = treasureFacade.GetTreasureInfo2(Fetch.GetUserCookie().UserID);
                if (scoreInfo != null)
                {
                    this.lblInsureScore.Text = scoreInfo.InsureScore.ToString( );
                }
            }

            Themes.Standard.Common_Header sHeader = (Themes.Standard.Common_Header) this.FindControl("sHeader");
            sHeader.title = "会员中心";
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SystemStatusInfo systemStatusInfo = accountsFacade.GetSystemStatusInfo("PresentExchangeRate");

            rate = systemStatusInfo == null ? 1 : systemStatusInfo.StatusValue;

            if (!IsPostBack)
            {
                Message umsg = accountsFacade.GetUserGlobalInfo(Fetch.GetUserCookie().UserID, 0, "");
                if (umsg.Success)
                {
                    UserInfo user = umsg.EntityList[0] as UserInfo;
                    this.lblAccounts.Text        = user.Accounts;
                    this.lblExchangeLoves.Text   = user.Present.ToString();
                    this.lblGameID.Text          = user.GameID.ToString();
                    this.lblTotalLoves.Text      = user.LoveLiness.ToString();
                    this.lblUnExchangeLoves.Text = (user.LoveLiness - user.Present).ToString();
                    this.txtPresent.Text         = (user.LoveLiness - user.Present).ToString();
                }
                GameScoreInfo scoreInfo = treasureFacade.GetTreasureInfo2(Fetch.GetUserCookie().UserID);
                if (scoreInfo != null)
                {
                    this.lblInsureScore.Text = scoreInfo.InsureScore.ToString();
                }
            }
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SystemStatusInfo systemStatusInfo = accountsFacade.GetSystemStatusInfo("MedalExchangeRate");

            rate = systemStatusInfo == null ? 1 : systemStatusInfo.StatusValue;

            if (!IsPostBack)
            {
                Message umsg = accountsFacade.GetUserGlobalInfo(Fetch.GetUserCookie().UserID, 0, "");
                if (umsg.Success)
                {
                    UserInfo user = umsg.EntityList[0] as UserInfo;
                    lblAccounts.Text = user.Accounts;
                    lblMedals.Text   = user.UserMedal.ToString();
                    lblGameID.Text   = user.GameID.ToString();
                    txtMedals.Text   = user.UserMedal.ToString();
                }

                GameScoreInfo scoreInfo = treasureFacade.GetTreasureInfo2(Fetch.GetUserCookie().UserID);
                if (scoreInfo != null)
                {
                    this.lblInsureScore.Text = scoreInfo.InsureScore.ToString();
                }
            }

            Themes.Standard.Common_Header sHeader = (Themes.Standard.Common_Header) this.FindControl("sHeader");
            sHeader.title = "会员中心";
        }
Exemplo n.º 4
0
        //参数审核
        private void CheckUserInfo()
        {
            string authstr = Utility.MD5(p1 + p2);

            if (authstr != p3)
            {
                Response.Write("<span style=\"color:red\">签名错误</span>");
                //Response.Redirect("Error.htm");
            }
            else
            {
                //验证用户
                int            userID         = Utility.StrToInt(p1, 0);
                AccountsFacade accountsFacade = new AccountsFacade( );
                Message        msg            = accountsFacade.GetUserGlobalInfo(userID, 0, "");
                if (msg.Success)
                {
                    UserInfo user = msg.EntityList[0] as UserInfo;
                    if (user.LogonPass != p2)
                    {
                        Response.Write("<span style=\"color:red\">密码错误</span>");
                        //Response.Redirect("Error.htm");
                    }
                    else
                    {
                        UserID = userID;
                    }
                }
                else
                {
                    Response.Write("<span style=\"color:red\">用户不存在</span>");
                    //Response.Redirect("Error.htm");
                }
            }
        }
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            int userId = 0;

            if (this.radType1.Checked)
            {
                userId = accountsFacade.GetUserIDByNickName(txtUser.Text.Trim());
                if (userId == 0)
                {
                    Show("您输入的用户昵称错误,请重新输入!");
                    this.txtUser.Text = "";
                    this.txtUser.Focus();
                    return;
                }
            }
            else
            {
                Message umsg = accountsFacade.GetUserGlobalInfo(0, Utility.StrToInt(txtUser.Text.Trim(), 0), "");
                if (!umsg.Success)
                {
                    Show("您输入的游戏ID号码错误,请重新输入!");
                    this.txtUser.Text = "";
                    this.txtUser.Focus();
                    return;
                }

                UserInfo user = umsg.EntityList[0] as UserInfo;
                userId = user.UserID;
            }

            int    score = Utility.StrToInt(txtScore.Text.Trim( ), 0);
            string note  = TextFilter.FilterScript(txtNote.Text.Trim( ));

            if (score <= 0)
            {
                Show("抱歉,您每笔转出数目最少 1000 金币!");
                return;
            }

            Message msg = treasureFacade.InsureTransfer(Fetch.GetUserCookie().UserID, TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtInsurePass)), userId, score, 1000, GameRequest.GetUserIP(), note);

            if (msg.Success)
            {
                ShowAndRedirect("转账成功!", "/Member/InsureTransfer.aspx");
            }
            else
            {
                Show(msg.Content);
            }
        }
Exemplo n.º 6
0
        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            if (this.radType2.Checked)
            {
                Message umsg = accountsFacade.GetUserGlobalInfo(0, Utility.StrToInt(txtContect.Text.Trim(), 0), "");
                if (!umsg.Success)
                {
                    Show("您输入的游戏ID号码错误,请重新输入!");
                    this.txtContect.Text = "";
                    this.txtContect.Focus();
                }
                else
                {
                    UserInfo user = umsg.EntityList[0] as UserInfo;
                    ViewState["UserID"] = user.UserID;

                    GetUserSecurityInfo(user.UserID);
                }
            }
            else
            {
                Message umsg = accountsFacade.GetUserGlobalInfo(0, 0, CtrlHelper.GetText(txtContect));
                if (umsg.Success)
                {
                    UserInfo user = umsg.EntityList[0] as UserInfo;
                    ViewState["UserID"] = user.UserID;
                    GetUserSecurityInfo(user.UserID);
                }
                else
                {
                    Show("您输入的用户名错误,请重新输入!");
                    this.txtContect.Text = "";
                    this.txtContect.Focus();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Message umsg = accountsFacade.GetUserGlobalInfo(Fetch.GetUserCookie().UserID, 0, "");
                if (umsg.Success)
                {
                    UserInfo ui = umsg.EntityList[0] as UserInfo;
                    this.lblGameID.Text   = ui.GameID.ToString();
                    this.lblNickname.Text = ui.NickName;
                }
            }

            Themes.Standard.Common_Header sHeader = (Themes.Standard.Common_Header) this.FindControl("sHeader");
            sHeader.title = "会员中心";
        }
Exemplo n.º 8
0
        public string GetUserInfo( )
        {
            UserTicketInfo userTick = Fetch.GetUserCookie( );

            if (userTick == null)
            {
                return("{}");
            }
            Message umsg = accountFacade.GetUserGlobalInfo(userTick.UserID, 0, "");

            if (umsg.Success)
            {
                UserInfo ui     = umsg.EntityList[0] as UserInfo;
                string   mOrder = ui.MemberOrder == 0 ? "普通会员" : ui.MemberOrder == 1 ? "蓝钻会员" : ui.MemberOrder == 2 ? "黄钻会员" : ui.MemberOrder == 3 ? "白钻会员" : "红钻会员";
                return("{success:'success',account:'" + ui.Accounts + "',gid:'" + ui.GameID + "',loves:'" + ui.LoveLiness + "',morder:'" + mOrder + "',fid:'" + ui.FaceID + "'}");
            }
            return("{}");
        }
        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.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Message umsg = accountsFacade.GetUserGlobalInfo(Fetch.GetUserCookie().UserID, 0, "");
                if (umsg.Success)
                {
                    UserInfo ui = umsg.EntityList[0] as UserInfo;
                    this.lblGender.Text = ui.Gender == 0 ? "女" : "男";
                    lblMember.Text      = ui.MemberOrder == 0 ? "普通会员" : ui.MemberOrder == 1 ? "蓝钻会员" : ui.MemberOrder == 2 ? "黄钻会员" : ui.MemberOrder == 3 ? "白钻会员" : "红钻会员";
                    lblNickName.Text    = ui.NickName;
                    lblAccounts.Text    = ui.Accounts;
                    lblExperience.Text  = ui.Experience.ToString();
                    lblUnderWrite.Text  = ui.UnderWrite;
                }
            }

            Themes.Standard.Common_Header sHeader = (Themes.Standard.Common_Header) this.FindControl("sHeader");
            sHeader.title = "会员中心";
        }
Exemplo n.º 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //判断是否登录
            if (!Fetch.IsUserOnline( ))
            {
                return;
            }

            if (!IsPostBack)
            {
                Message umsg = accountsFacade.GetUserGlobalInfo(Fetch.GetUserCookie( ).UserID, 0, "");
                if (umsg.Success)
                {
                    UserInfo user = umsg.EntityList[0] as UserInfo;
                    if (user != null && user.MemberOrder <= 0)
                    {
                        this.form1.Visible      = false;
                        this.divRight.Visible   = true;
                        this.divRight.InnerHtml = "<div class=\"Uerror\">抱歉!您不是会员,不能进行负分清零操作。<br /><a href=\"/Pay/PayIndex.aspx\" class=\"lan\" target=\"_blank\">点击购买会员</a></div>";
                        return;
                    }
                }

                DataTable  dtScore     = new DataTable( );
                DataColumn colKindName = new DataColumn("KindName");
                DataColumn colScore    = new DataColumn("Score");
                DataColumn colKindID   = new DataColumn("KindID");

                dtScore.Columns.Add(colKindName);
                dtScore.Columns.Add(colScore);
                dtScore.Columns.Add(colKindID);

                IList <GameKindItem> kinds = platformFacade.GetIntegralKinds();

                foreach (GameKindItem kind in kinds)
                {
                    TreasureFacade treasureFacade = new TreasureFacade(kind.KindID);

                    GameScoreInfo scoreInfo = treasureFacade.GetTreasureInfo2(Fetch.GetUserCookie( ).UserID);
                    if (scoreInfo == null)
                    {
                        continue;
                    }
                    if (scoreInfo.Score < 0)
                    {
                        DataRow r = dtScore.NewRow( );
                        r["KindName"] = kind.KindName;
                        r["KindID"]   = kind.KindID;
                        r["Score"]    = scoreInfo.Score;

                        dtScore.Rows.Add(r);
                    }
                }

                if (dtScore.Rows.Count > 0)
                {
                    rptScoreList.DataSource = dtScore;
                    rptScoreList.DataBind( );

                    this.lblAccounts.Text = Fetch.GetUserCookie( ).Accounts;
                    this.lblNumber.Text   = dtScore.Rows.Count.ToString( );

                    this.form1.Visible    = true;
                    this.divRight.Visible = false;
                }
                else
                {
                    this.form1.Visible    = false;
                    this.divRight.Visible = true;

                    this.divRight.InnerHtml = "<div class=\"Uright\">恭喜!您的游戏成绩保持的非常好,没有负分需要清零。</div>";
                }
            }

            /*Themes.Standard.Common_Header sHeader = ( Themes.Standard.Common_Header )this.FindControl( "sHeader" );
             * sHeader.title = "会员中心";*/
        }