private void BindData() { var l = League.Cache.Load(ContestLeague); if (l != null) { hlGamblerLeagueView.Text = $"{l.LeagueName}{l.LeagueSeason}排行榜"; hlGamblerLeagueView.NavigateUrl = $"CasinoGambler.aspx?League={ContestLeague}"; hlGamblerLeagueView.Target = "_self"; } List <Entity.CasinoGambler> list; if (!CurrentLeague.Equals(Guid.Empty)) { if (ContestArea > 0) { var tbs = ConfigGlobal.TotalBetStandard; list = Entity.CasinoGambler.GetCasinoGamblers(CurrentLeague).FindAll(delegate(Entity.CasinoGambler cg) { if (ContestArea == 1) { return(cg.TotalBet >= tbs); } if (ContestArea == 2) { return(cg.TotalBet < tbs); } return(true); }); } else { list = Entity.CasinoGambler.GetCasinoGamblers(CurrentLeague); } ddlContestArea.Visible = true; } else { list = Entity.CasinoGambler.GetCasinoGamblers(); ddlContestArea.Visible = false; } if (list != null && list.Count > 0) { list = !string.IsNullOrEmpty(ddlOrderClause.SelectedValue) ? Entity.CasinoGambler.SortCasinoGambler(list, ddlOrderClause.SelectedValue) : Entity.CasinoGambler.SortCasinoGambler(list); } gvGambler.DataSource = list; gvGambler.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { #region Assign Control Property ctrlLeftPanel.UserId = userid; ctrlLeftPanel.UserName = username; ctrlFieldTooBar.UserId = userid; ctrlMenuTabBar.CurrentMenu = CasinoMenuType.CasinoGroup; ctrlLeagueHeader.CurrLeagueGuid = CurrentLeague; ctrlLeagueHeader.PageUrl = "CasinoGroup.aspx"; #endregion if (!IsPostBack) { if (CurrentLeague != Guid.Empty) { //Bind ddlSeason var list = League.Cache.GetSeasonsByLeagueGuid(CurrentLeague); ddlSeason.DataSource = list; ddlSeason.DataTextField = "LeagueSeason"; ddlSeason.DataValueField = "ID"; ddlSeason.DataBind(); ddlSeason.SelectedValue = CurrentLeague.ToString(); // Bind ddlGroup var dtGroup = Group.GetGroupByLeague(CurrentLeague); if (dtGroup != null) { ddlGroup.DataSource = dtGroup; ddlGroup.DataTextField = "GroupName"; ddlGroup.DataValueField = "GroupGuid"; ddlGroup.DataBind(); var item = new ListItem("所有分组", Guid.Empty.ToString()); ddlGroup.Items.Insert(0, item); ddlGroup.SelectedValue = CurrentGroup.ToString(); } else { ddlGroup.Visible = false; } } else { ddlSeason.Visible = false; } BindData(); } }
protected void Page_Load(object sender, EventArgs e) { #region Assign Control Property ctrlLeftPanel.UserId = userid; ctrlLeftPanel.UserName = username; ctrlFieldTooBar.UserId = userid; ctrlMenuTabBar.CurrentMenu = CasinoMenuType.CasinoGame; ctrlLeagueHeader.CurrLeagueGuid = CurrentLeague; ctrlLeagueHeader.PageUrl = "CasinoGame.aspx"; #endregion if (!IsPostBack) { if (CurrentLeague != Guid.Empty) { var list = League.Cache.GetSeasonsByLeagueGuid(CurrentLeague); ddlSeason.DataSource = list; ddlSeason.DataTextField = "LeagueSeason"; ddlSeason.DataValueField = "ID"; ddlSeason.DataBind(); ddlSeason.SelectedValue = CurrentLeague.ToString(); } else { ddlSeason.Visible = false; ddlGameTip.Visible = true; } BindData(); } }