protected void Page_Load(object sender, EventArgs e) { if (Session["User"] == null) { Response.Redirect("~/Home.aspx"); } User user = (User)Session["User"]; if (user.type != UserType.Manager) { Response.Redirect("~/Home.aspx"); } OnilneLbl.Text = Application["Users Online"].ToString(); VisitorsTodayLbl.Text = Application["Visitors Today"].ToString(); UserAmount.Text = BLL_Helper.GetUserAmount().ToString(); List <int> games = BLL_Helper.GamesPlayedInMonth(); for (int i = 0; i < games.Count; i++) { GamesInDates.Series[0].Points.AddXY(DateTime.Today.AddDays(-i), games[i]); } List <Rank> ranks = BLL_Helper.GetAllRanks(); foreach (Rank rank in ranks) { int amount = BLL_Helper.GetAllUsersInRankThisSeason(rank.ID).Count; LeagueDistrobution.Series[0].Points.AddXY(rank.name, amount); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { RanksDropDown.DataSource = BLL_Helper.GetAllRanks(); RanksDropDown.DataBind(); } Leaderboard.DataSource = BLL_Helper.GetAllPlayersInRankThisSeasonDataTable(int.Parse(RanksDropDown.SelectedValue)); Leaderboard.DataBind(); }
public List <WSRank> GetAllRanks() { List <WSRank> ret = new List <WSRank>(); List <Rank> ranks = BLL_Helper.GetAllRanks(); foreach (Rank rank in ranks) { ret.Add(new WSRank(rank)); } return(RankListToWSRankList(BLL_Helper.GetAllRanks())); }