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