protected override void SetIndexData() { base.SetIndexData(); var rounds = new RoundRepository().GetFinishedRounds(DataExtensions.UserIsAdmin()); ViewData.Model = rounds.GetEnumerator(); if (rounds.Count() > 0) { ViewBag.FirstRoundID = rounds.First().ID; } }
protected override void SetIndexData() { base.SetIndexData(); var users = new UserRepository().GetActiveUsers().OrderByDescending(e => e.PointsWonBonus); ViewBag.Users = users.GetEnumerator(); ViewBag.GlobalBetsExpired = new MatchRepository().GlobalBetsExpired(); if (users.Count() > 0) { ViewBag.FirstUserID = users.First().UserID; } var rounds = new RoundRepository().GetFinishedRounds(DataExtensions.UserIsAdmin()); ViewBag.Rounds = rounds.GetEnumerator(); if (rounds.Count() > 0) { ViewBag.FirstRoundID = rounds.First().ID; } }