protected void Page_Load(object sender, EventArgs e)
        {
            SiteMaster.Menu = 1;
            if (!IsPostBack)
            {
                //获取登录信息
                UserTicketInfo user = userTicket;

                //获取游戏豆信息
                UserCurrencyInfo currency = FacadeManage.aideTreasureFacade.GetUserCurrencyInfo(user.UserID);
                lbCurrency.Text = currency != null?Convert.ToInt32(currency.Currency).ToString() : "0";

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

                //获取购买产品
                int            id     = GameRequest.GetQueryInt("id", 0);
                RoomCardConfig config = FacadeManage.aideTreasureFacade.GetRoomCardConfig(id);
                if (config == null)
                {
                    return;
                }

                lbExchCard.Text    = config.RoomCard.ToString();
                lbPayCurrency.Text = Convert.ToInt32(config.Currency).ToString();
            }
        }
Exemple #2
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());
        }
        /// <summary>
        /// 获取用户游戏豆
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        public decimal GetUserCurrency(int userID)
        {
            UserCurrencyInfo model = FacadeManage.aideTreasureFacade.GetUserCurrencyInfo(userID);

            if (model != null)
            {
                return(model.Currency);
            }
            return(0);
        }
Exemple #4
0
        public decimal GetUserCurrency(int userID)
        {
            UserCurrencyInfo userCurrencyInfo = FacadeManage.aideTreasureFacade.GetUserCurrencyInfo(userID);
            decimal          result;

            if (userCurrencyInfo != null)
            {
                result = userCurrencyInfo.Currency;
            }
            else
            {
                result = 0m;
            }
            return(result);
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SiteMaster.Menu = 1;
            if (!IsPostBack)
            {
                //获取登录信息
                UserTicketInfo user = userTicket;

                //获取游戏豆信息
                UserCurrencyInfo currency = FacadeManage.aideTreasureFacade.GetUserCurrencyInfo(user.UserID);
                lbCurrency.Text = currency != null?Convert.ToInt32(currency.Currency).ToString() : "0";

                //获取房卡信息
                UserRoomCard card = FacadeManage.aideTreasureFacade.GetUserRoomCard(user.UserID);
                lbRoomCard.Text = card != null?card.RoomCard.ToString() : "0";
            }
        }
Exemple #6
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";
                }
            }
        }
Exemple #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SiteMaster.Menu = 1;
            payId           = GameRequest.GetInt("id", 0);
            if (!IsPostBack)
            {
                //获取登录信息
                UserTicketInfo user = userTicket;
                if (payId <= 0)
                {
                    Response.Redirect("/Menu/Buy.aspx");
                }

                //获取游戏豆信息
                UserCurrencyInfo currency = FacadeManage.aideTreasureFacade.GetUserCurrencyInfo(user.UserID);
                lbCurrency.Text = currency != null?Convert.ToInt32(currency.Currency).ToString() : "0";

                //获取房卡信息
                UserRoomCard card = FacadeManage.aideTreasureFacade.GetUserRoomCard(user.UserID);
                lbRoomCard.Text = card != null?card.RoomCard.ToString() : "0";
            }
        }
Exemple #8
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //获取登录信息
                UserTicketInfo user = userTicket;

                //获取游戏豆信息
                UserCurrencyInfo currency = FacadeManage.aideTreasureFacade.GetUserCurrencyInfo(user.UserID);
                lbCurrucy.Text = currency != null?Convert.ToInt32(currency.Currency).ToString() : "0";

                //获取房卡信息
                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.Cash);
                }
                maxNum = currency != null?Convert.ToInt32(currency.Currency / rate) : 0;
            }
        }