/// <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); } }
/// <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; } }