예제 #1
0
        /// <summary>
        /// 根据用户ID获取积分实体
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns></returns>
        public GameScoreInfo GetSocreInfoByUserId(int userId)
        {
            string        sqlQuery = string.Format("(NOLOCK) WHERE UserID= N'{0}'", userId);
            GameScoreInfo model    = aideGameScoreInfo.GetObject <GameScoreInfo>(sqlQuery);

            return(model);
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                UserInfo userInfo = FacadeManage.aideAccountsFacade.GetUserBaseInfoByUserID(Fetch.GetUserCookie().UserID);
                this.lblAccounts.Text = userInfo.Accounts;
                this.lblGameID.Text   = userInfo.GameID.ToString();

                Message umsg = FacadeManage.aideTreasureFacade.GetUserSpreadInfo(Fetch.GetUserCookie().UserID);
                if (umsg.Success)
                {
                    RecordSpreadInfo spreader = umsg.EntityList[0] as RecordSpreadInfo;
                    this.lblInsure.Text = spreader.InsureScore.ToString();
                    this.lblRecord.Text = spreader.RecordID.ToString();
                    this.lblScore.Text  = spreader.Score.ToString();

                    this.txtScore.Text = spreader.RecordID.ToString();
                }

                GameScoreInfo scoreInfo = FacadeManage.aideTreasureFacade.GetTreasureInfo2(Fetch.GetUserCookie().UserID);
                if (scoreInfo != null)
                {
                    this.lblInsureScore.Text = scoreInfo.InsureScore.ToString();
                }
            }
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //获取兑换率
            SystemStatusInfo systemStatusInfo = FacadeManage.aideAccountsFacade.GetSystemStatusInfo(AppConfig.SystemConfigKey.MedalExchangeRate.ToString());

            if (systemStatusInfo != null)
            {
                rate = systemStatusInfo.StatusValue;
            }

            if (!IsPostBack)
            {
                Message umsg = FacadeManage.aideAccountsFacade.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 = FacadeManage.aideTreasureFacade.GetTreasureInfo2(Fetch.GetUserCookie().UserID);
                if (scoreInfo != null)
                {
                    this.lblInsureScore.Text = scoreInfo.InsureScore.ToString();
                }
            }
        }
예제 #4
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 = "会员中心";
        }
예제 #5
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();
                }
            }
        }
        /// <summary>
        /// 获取用户金币信息
        /// </summary>
        /// <param name="UserID"></param>
        /// <returns></returns>
        public GameScoreInfo GetGameScoreInfoByUserID(int UserID)
        {
            string        sqlQuery      = string.Format("(NOLOCK) WHERE UserID= N'{0}'", UserID);
            GameScoreInfo gameScoreInfo = aideGameScoreInfoProvider.GetObject <GameScoreInfo>(sqlQuery);

            return(gameScoreInfo);
        }
예제 #7
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //获取登录信息
                UserTicketInfo user = userTicket;

                //获取游戏币信息
                GameScoreInfo score  = FacadeManage.aideTreasureFacade.GetTreasureInfo2(user.UserID);
                long          insure = score != null ? score.InsureScore : 0;
                lbInsure.Text = insure.ToString();

                //获取房卡信息
                UserRoomCard card = FacadeManage.aideTreasureFacade.GetUserRoomCard(user.UserID);
                lbRoomCard.Text = card != null?card.RoomCard.ToString() : "0";

                //购买比例
                Entity.Platform.GameProperty prop = FacadeManage.aidePlatformFacade.GetGameProperty(501);
                if (prop != null)
                {
                    rate = Convert.ToInt32(prop.Gold);
                }
                maxNum = Convert.ToInt32(Convert.ToDecimal(insure) / rate);
            }
        }
예제 #8
0
        /// <summary>
        /// 根据用户ID得到金币信息
        /// </summary>
        /// <param name="UserID"></param>
        /// <returns></returns>
        public GameScoreInfo GetTreasureInfo2(int UserID)
        {
            string        sqlQuery = string.Format("SELECT * FROM GameScoreInfo(NOLOCK) WHERE UserID={0}", UserID);
            GameScoreInfo score    = Database.ExecuteObject <GameScoreInfo>(sqlQuery);

            return(score);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                UserInfo userInfo = accountsFacade.GetUserBaseInfoByUserID(Fetch.GetUserCookie().UserID);
                this.lblAccounts.Text = userInfo.Accounts;
                this.lblGameID.Text   = userInfo.GameID.ToString();

                Message umsg = treasureFacade.GetUserSpreadInfo(Fetch.GetUserCookie().UserID);
                if (umsg.Success)
                {
                    RecordSpreadInfo spreader = umsg.EntityList[0] as RecordSpreadInfo;
                    this.lblInsure.Text = spreader.InsureScore.ToString();
                    this.lblRecord.Text = spreader.RecordID.ToString();
                    this.lblScore.Text  = spreader.Score.ToString();

                    this.txtScore.Text = spreader.RecordID.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 = "会员中心";
        }
        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 = "会员中心";
        }
예제 #11
0
        private void BindData()
        {
            if (IntParam <= 0)
            {
                return;
            }
            //获取信息
            AccountsInfo model = FacadeManage.aideAccountsFacade.GetAccountInfoByUserID(IntParam);

            if (model == null)
            {
                MessageBox("用户信息不存在");
                return;
            }

            CtrlHelper.SetText(ltGameID, model.GameID.ToString());
            CtrlHelper.SetText(ltAccounts, model.Accounts.Trim());
            CtrlHelper.SetText(ltUserModel, model.UserMedal.ToString("N0"));
            CtrlHelper.SetText(ltLove, model.LoveLiness.ToString("N0"));

            UserCurrencyInfo uci = FacadeManage.aideTreasureFacade.GetUserCurrencyInfo(IntParam);

            if (uci != null)
            {
                ltCurrency.Text = uci.Currency.ToString("N0");
            }

            //游戏币信息
            GameScoreInfo scoreInfo = FacadeManage.aideTreasureFacade.GetGameScoreInfoByUserID(IntParam);

            if (scoreInfo == null)
            {
                return;
            }
            CtrlHelper.SetText(ltScore, scoreInfo.Score.ToString("N0"));
            CtrlHelper.SetText(ltInsureScore, scoreInfo.InsureScore.ToString("N0"));
            CtrlHelper.SetText(ltWinCount, scoreInfo.WinCount.ToString());
            CtrlHelper.SetText(ltLostCount, scoreInfo.LostCount.ToString());
            CtrlHelper.SetText(ltDrawCount, scoreInfo.DrawCount.ToString());
            CtrlHelper.SetText(ltFleeCount, scoreInfo.FleeCount.ToString());
            CtrlHelper.SetText(ltRevenue, scoreInfo.Revenue.ToString("N0"));

            //登录房间、注册信息
            CtrlHelper.SetText(ltGameLogonTimes, scoreInfo.AllLogonTimes.ToString());
            CtrlHelper.SetText(ltLastLogonDate, scoreInfo.AllLogonTimes == 0 ? "从未登陆房间" : scoreInfo.LastLogonDate.ToString("yyyy-MM-dd HH:mm:ss"));
            CtrlHelper.SetText(ltLogonSpacingTime, scoreInfo.AllLogonTimes == 0 ? "" : Fetch.GetTimeSpan(Convert.ToDateTime(scoreInfo.LastLogonDate), DateTime.Now) + " 前");

            CtrlHelper.SetText(ltLastLogonIP, scoreInfo.LastLogonIP.ToString());
            CtrlHelper.SetText(ltLogonIPInfo, IPQuery.GetAddressWithIP(scoreInfo.LastLogonIP.ToString()));
            CtrlHelper.SetText(ltLastLogonMachine, scoreInfo.LastLogonMachine.ToString());
            CtrlHelper.SetText(ltRegisterDate, scoreInfo.RegisterDate.ToString("yyyy-MM-dd HH:mm:ss"));
            CtrlHelper.SetText(ltRegisterIP, scoreInfo.RegisterIP.ToString());
            CtrlHelper.SetText(ltRegIPInfo, IPQuery.GetAddressWithIP(scoreInfo.RegisterIP.ToString()));
            CtrlHelper.SetText(ltRegisterMachine, scoreInfo.RegisterMachine.ToString());
            CtrlHelper.SetText(ltOnLineTimeCount, scoreInfo.OnLineTimeCount.ToString());
            CtrlHelper.SetText(ltPlayTimeCount, scoreInfo.PlayTimeCount.ToString());
        }
예제 #12
0
        /// <summary>
        /// 获取用户金币
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        public Int64 GetUserScore(int userID)
        {
            GameScoreInfo model = FacadeManage.aideTreasureFacade.GetTreasureInfo2(userID);

            if (model != null)
            {
                return(model.Score);
            }
            return(0);
        }
예제 #13
0
        /// <summary>
        /// 获取金币
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        protected string GetScoreByUserID(int userID)
        {
            GameScoreInfo model = aideTreasureFacade.GetGameScoreInfoByUserID(userID);

            if (model == null)
            {
                return("0");
            }
            return(model.Score.ToString( ));
        }
예제 #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GameScoreInfo scoreInfo = FacadeManage.aideTreasureFacade.GetTreasureInfo2(Fetch.GetUserCookie().UserID);
         if (scoreInfo != null)
         {
             this.lblInsureScore.Text = scoreInfo.InsureScore.ToString();
             this.lblScore.Text       = scoreInfo.Score.ToString();
             this.txtScore.Text       = scoreInfo.InsureScore.ToString();
         }
     }
 }
        /// <summary>
        /// 获取用户的银行金币
        /// </summary>
        /// <param name="UserID">用户标识 </param>
        /// <returns></returns>
        public decimal GetGameScoreByUserID(int UserID)
        {
            GameScoreInfo gameScoreInfo = GetGameScoreInfoByUserID(UserID);

            if (gameScoreInfo == null)
            {
                return(0);
            }
            else
            {
                return(gameScoreInfo.InsureScore);
            }
        }
        /// <summary>
        /// 更新用户银行金币
        /// </summary>
        /// <param name="gameScoreInfo"></param>
        public void UpdateInsureScore(GameScoreInfo gameScoreInfo)
        {
            StringBuilder sqlQuery = new StringBuilder( );

            sqlQuery.Append("UPDATE GameScoreInfo SET ")
            .Append("InsureScore=@InsureScore ")
            .Append("WHERE UserID=@UserID");

            var prams = new List <DbParameter>( );

            prams.Add(Database.MakeInParam("InsureScore", gameScoreInfo.InsureScore));
            prams.Add(Database.MakeInParam("UserID", gameScoreInfo.UserID));

            Database.ExecuteNonQuery(CommandType.Text, sqlQuery.ToString( ), prams.ToArray( ));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GameScoreInfo scoreInfo = treasureFacade.GetTreasureInfo2(Fetch.GetUserCookie().UserID);
                if (scoreInfo != null)
                {
                    this.lblInsureScore.Text = scoreInfo.InsureScore.ToString( );
                    this.lblScore.Text       = scoreInfo.Score.ToString( );
                }
            }

            Themes.Standard.Common_Header sHeader = (Themes.Standard.Common_Header) this.FindControl("sHeader");
            sHeader.title = "会员中心";
        }
예제 #18
0
        public decimal GetUserScore(int userID)
        {
            GameScoreInfo treasureInfo = FacadeManage.aideTreasureFacade.GetTreasureInfo2(userID);
            decimal       result;

            if (treasureInfo != null)
            {
                result = treasureInfo.Score;
            }
            else
            {
                result = 0m;
            }
            return(result);
        }
예제 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GameScoreInfo scoreInfo = FacadeManage.aideTreasureFacade.GetTreasureInfo2(Fetch.GetUserCookie().UserID);
                if (scoreInfo != null)
                {
                    this.lblInsureScore.Text = scoreInfo.InsureScore.ToString();
                    this.lblScore.Text       = scoreInfo.Score.ToString();
                }
            }

            StringBuilder sqlQuery = new StringBuilder();

            sqlQuery.AppendFormat("select {0} from {1} where {2}='{3}'", SystemStatusInfo._StatusValue, SystemStatusInfo.Tablename, SystemStatusInfo._StatusName, "TransferPrerequisite");
            MinTradeScore = Convert.ToInt32(FacadeManage.aideAccountsFacade.GetObjectBySql(sqlQuery.ToString()));
        }
예제 #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SiteMaster.Menu = 2;
            if (!IsPostBack)
            {
                //获取登录信息
                UserTicketInfo user = userTicket;

                //获取游戏币信息
                GameScoreInfo score = FacadeManage.aideTreasureFacade.GetTreasureInfo2(user.UserID);
                lbGold.Text = score != null?score.Score.ToString() : "0";

                //获取房卡信息
                UserRoomCard card = FacadeManage.aideTreasureFacade.GetUserRoomCard(user.UserID);
                lbRoomCard.Text = card != null?card.RoomCard.ToString() : "0";
            }
        }
예제 #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Message umsg = FacadeManage.aideAccountsFacade.GetUserGlobalInfo(Fetch.GetUserCookie().UserID, 0, "");
                if (umsg.Success)
                {
                    UserInfo ui = umsg.EntityList[0] as UserInfo;
                    accounts   = ui.Accounts;
                    nickName   = ui.NickName;
                    gameID     = ui.GameID.ToString();
                    gender     = ui.Gender == 0 ? "女" : "男";
                    experience = ui.Experience.ToString("N0");
                    if (ui.MemberOrder == 0)
                    {
                        member = GetMemberInfo(ui.MemberOrder);
                    }
                    else
                    {
                        member = GetMemberInfo(ui.MemberOrder) + "&nbsp;[" + ui.MemberOverDate.ToString("yyyy-MM-dd") + "]";
                    }
                    underWrite = ui.UnderWrite;
                    loveLiness = ui.LoveLiness.ToString("N0");
                    medal      = ui.UserMedal.ToString("N0");
                    faceUrl    = FacadeManage.aideAccountsFacade.GetUserFaceUrl(ui.FaceID, ui.CustomID);
                }

                GameScoreInfo scoreInfo = FacadeManage.aideTreasureFacade.GetTreasureInfo2(Fetch.GetUserCookie().UserID);
                if (scoreInfo != null)
                {
                    score       = scoreInfo.Score.ToString("N0");
                    insureScore = scoreInfo.InsureScore.ToString("N0");
                }

                UserCurrencyInfo currencyInfo = FacadeManage.aideTreasureFacade.GetUserCurrencyInfo(Fetch.GetUserCookie().UserID);
                if (currencyInfo != null)
                {
                    currency = currencyInfo.Currency.ToString("N");
                }
                else
                {
                    currency = "0";
                }
            }
        }
예제 #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GameScoreInfo scoreInfo = treasureFacade.GetTreasureInfo2(Fetch.GetUserCookie( ).UserID);
                if (scoreInfo != null)
                {
                    this.lblInsureScore.Text = scoreInfo.InsureScore.ToString( );
                    this.lblScore.Text       = scoreInfo.Score.ToString( );
                }

                StringBuilder sqlQuery = new StringBuilder( );
                sqlQuery.AppendFormat("select {0} from {1} where {2}='{3}'", SystemStatusInfo._StatusValue, SystemStatusInfo.Tablename, SystemStatusInfo._StatusName, "TransferPrerequisite");
                MinTradeScore = Convert.ToInt32(accountsFacade.GetObjectBySql(sqlQuery.ToString( )));
            }

            Themes.Standard.Common_Header sHeader = (Themes.Standard.Common_Header) this.FindControl("sHeader");
            sHeader.title = "会员中心";
        }
예제 #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SiteMaster.Menu = 0;
            if (!IsPostBack)
            {
                //获取登录信息
                UserTicketInfo user = userTicket;
                lbAccount.Text = user.Accounts;
                //获取代理信息
                AccountsAgent agent = FacadeManage.aideAccountsFacade.GetAccountAgentByUserID(user.UserID);
                if (agent != null)
                {
                    lbDomain.Text   = agent.Domain;
                    lbMobile.Text   = agent.MobilePhone;
                    lbNumber.Text   = agent.AgentID.ToString();
                    lbRealName.Text = agent.Compellation;
                    lbWechat.Text   = agent.WeChat;
                }
                //获取游戏币信息
                GameScoreInfo score = FacadeManage.aideTreasureFacade.GetTreasureInfo2(user.UserID);
                if (score != null)
                {
                    lbGold.Text = score.Score.ToString();
                }
                //获取房卡信息
                UserRoomCard card = FacadeManage.aideTreasureFacade.GetUserRoomCard(user.UserID);
                if (card != null)
                {
                    lbRoomCard.Text = card.RoomCard.ToString();
                }

                //获取公告信息
                rpData.DataSource = FacadeManage.aideNativeWebFacade.GetRoomCardNews(4);
                rpData.DataBind();
            }
        }
예제 #24
0
        protected int rateRoomCard = 1;   //房卡兑换游戏币比例
        protected void Page_Load(object sender, EventArgs e)
        {
            SiteMaster.Menu = 2;
            if (!IsPostBack)
            {
                //获取登录信息
                UserTicketInfo user = userTicket;

                //获取游戏币信息
                GameScoreInfo score = FacadeManage.aideTreasureFacade.GetTreasureInfo2(user.UserID);
                lbGold.Text = score != null?score.Score.ToString() : "0";

                //获取房卡信息
                UserRoomCard card = FacadeManage.aideTreasureFacade.GetUserRoomCard(user.UserID);
                lbRoomCard.Text = card != null?card.RoomCard.ToString() : "0";

                //获取兑换比例
                SystemStatusInfo ssi = FacadeManage.aideAccountsFacade.GetSystemStatusInfo(AppConfig.SystemConfigKey.AgentRoomCardExchRate.ToString());
                if (ssi != null)
                {
                    rateRoomCard = ssi.StatusValue;
                }
            }
        }
예제 #25
0
 public void UpdateInsureScore(GameScoreInfo gameScoreInfo)
 {
     this.aideTreasureData.UpdateInsureScore(gameScoreInfo);
 }
예제 #26
0
        /// <summary>
        /// 注册
        /// </summary>
        private void RegisterAccounts()
        {
            if (TextUtility.EmptyTrimOrNull(txtAccounts.Text.Trim()) || TextUtility.EmptyTrimOrNull(txtLogonPass.Text.Trim()))
            {
                Show("抱歉!您输入的帐号或密码错误了。");
                this.txtAccounts.Focus();
                return;
            }

            //验证码错误
            if (!txtCode.Text.Trim().Equals(Fetch.GetVerifyCode(), StringComparison.InvariantCultureIgnoreCase))
            {
                Show("抱歉!您输入的验证码错误了。");
                this.txtAccounts.Focus();
                return;
            }

            Message umsg = FacadeManage.aideAccountsFacade.IsAccountsExist(CtrlHelper.GetTextAndFilter(txtAccounts));

            if (!umsg.Success)
            {
                Show(umsg.Content);
                this.txtAccounts.Focus();
                return;
            }

            UserInfo user = new UserInfo();

            user.Accounts      = CtrlHelper.GetTextAndFilter(txtAccounts);
            user.InsurePass    = TextEncrypt.EncryptPassword(CtrlHelper.GetTextAndFilter(txtLogonPass));
            user.LastLogonDate = DateTime.Now;
            user.LastLogonIP   = GameRequest.GetUserIP();
            user.LogonPass     = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtLogonPass));
            user.NickName      = CtrlHelper.GetTextAndFilter(txtAccounts);
            user.RegisterDate  = DateTime.Now;
            user.RegisterIP    = GameRequest.GetUserIP();
            user.DynamicPass   = Guid.NewGuid().ToString().Replace("-", "").ToUpper();

            Message msg = FacadeManage.aideAccountsFacade.Register(user, CtrlHelper.GetText(txtSpreader));

            if (msg.Success)
            {
                UserInfo ui = msg.EntityList[0] as UserInfo;
                ui.LogonPass = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtLogonPass));
                Fetch.SetUserCookie(ui.ToUserTicketInfo());

                SwitchStep(2);
                accounts = CtrlHelper.GetTextAndFilter(txtAccounts);
                GameScoreInfo model = FacadeManage.aideTreasureFacade.GetTreasureInfo2(ui.UserID);
                if (model != null)
                {
                    score = model.Score.ToString();
                }
                ConfigInfo ci = FacadeManage.aideNativeWebFacade.GetConfigInfo(AppConfig.SiteConfigKey.GameAndroidConfig.ToString());
                if (ci != null)
                {
                    downLoadAndroidUrl = ci.Field1;
                }
                ci = FacadeManage.aideNativeWebFacade.GetConfigInfo(AppConfig.SiteConfigKey.GameIosConfig.ToString());
                if (ci != null)
                {
                    downLoadIosUrl = ci.Field1;
                }
                if (Fetch.GetTerminalType(Page.Request) == 1)
                {
                    downLoadUrl = downLoadAndroidUrl;
                }
                else
                {
                    downLoadUrl = downLoadIosUrl;
                }
            }
            else
            {
                Show(msg.Content);
                this.txtAccounts.Focus();
            }
        }
예제 #27
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 = "会员中心";*/
        }
예제 #28
0
 private void RegisterAccounts()
 {
     if (TextUtility.EmptyTrimOrNull(this.txtAccounts.Text.Trim()) || TextUtility.EmptyTrimOrNull(this.txtLogonPass.Text.Trim()))
     {
         base.Show("抱歉!您输入的帐号或密码错误了。");
         this.txtAccounts.Focus();
     }
     else
     {
         if (!this.txtCode.Text.Trim().Equals(Fetch.GetVerifyCode(), System.StringComparison.InvariantCultureIgnoreCase))
         {
             base.Show("抱歉!您输入的验证码错误了。");
             this.txtAccounts.Focus();
         }
         else
         {
             Message message = FacadeManage.aideAccountsFacade.IsAccountsExist(CtrlHelper.GetTextAndFilter(this.txtAccounts));
             if (!message.Success)
             {
                 base.Show(message.Content);
                 this.txtAccounts.Focus();
             }
             else
             {
                 UserInfo userInfo = new UserInfo();
                 userInfo.Accounts      = CtrlHelper.GetTextAndFilter(this.txtAccounts);
                 userInfo.InsurePass    = TextEncrypt.EncryptPassword(CtrlHelper.GetTextAndFilter(this.txtLogonPass));
                 userInfo.LastLogonDate = System.DateTime.Now;
                 userInfo.LastLogonIP   = GameRequest.GetUserIP();
                 userInfo.LogonPass     = TextEncrypt.EncryptPassword(CtrlHelper.GetText(this.txtLogonPass));
                 userInfo.NickName      = CtrlHelper.GetTextAndFilter(this.txtAccounts);
                 userInfo.RegisterDate  = System.DateTime.Now;
                 userInfo.RegisterIP    = GameRequest.GetUserIP();
                 userInfo.DynamicPass   = System.Guid.NewGuid().ToString().Replace("-", "").ToUpper();
                 Message message2 = FacadeManage.aideAccountsFacade.Register(userInfo, CtrlHelper.GetText(this.txtSpreader), "");
                 if (!message2.Success)
                 {
                     base.Show(message2.Content);
                     this.txtAccounts.Focus();
                 }
                 else
                 {
                     UserInfo userInfo2 = message2.EntityList[0] as UserInfo;
                     userInfo2.LogonPass = TextEncrypt.EncryptPassword(CtrlHelper.GetText(this.txtLogonPass));
                     Fetch.SetUserCookie(userInfo2.ToUserTicketInfo());
                     this.SwitchStep(2);
                     this.accounts = CtrlHelper.GetTextAndFilter(this.txtAccounts);
                     GameScoreInfo treasureInfo = FacadeManage.aideTreasureFacade.GetTreasureInfo2(userInfo2.UserID);
                     if (treasureInfo != null)
                     {
                         this.score = treasureInfo.Score.ToString();
                     }
                     ConfigInfo configInfo = FacadeManage.aideNativeWebFacade.GetConfigInfo(AppConfig.SiteConfigKey.GameAndroidConfig.ToString());
                     if (configInfo != null)
                     {
                         this.downLoadAndroidUrl = configInfo.Field1;
                     }
                     configInfo = FacadeManage.aideNativeWebFacade.GetConfigInfo(AppConfig.SiteConfigKey.GameIosConfig.ToString());
                     if (configInfo != null)
                     {
                         this.downLoadIosUrl = configInfo.Field1;
                     }
                     if (Fetch.GetTerminalType(this.Page.Request) == 1)
                     {
                         this.downLoadUrl = this.downLoadAndroidUrl;
                     }
                     else
                     {
                         this.downLoadUrl = this.downLoadIosUrl;
                     }
                 }
             }
         }
     }
 }