public SeasonStatsModel(SeasonStatsParameters seasonParameters)
        {
            _seasonStatsParameters = seasonParameters;
            _database = new BeaujeauxEntities();

            // League
            LeagueOptions  = _database.Leagues.ToList();
            SelectedLeague = LeagueOptions.Where(s => s.Id == _seasonStatsParameters.leagueId).FirstOrDefault();
            SelectedLeague = SelectedLeague ?? LeagueOptions.FirstOrDefault();

            // All Seasons for the League
            var _seasons = _database.Seasons
                           .Where(s => s.LeagueId == SelectedLeague.Id);

            SelectedLeagueEra = seasonParameters.leagueEra;

            SetSeasonNumberOptions();
            SetSeasonTypeOptions(_seasons);
            SetSelectedSeasonType(_seasonStatsParameters.seasonTypeId);
            SetSelectedSeason(_seasonStatsParameters.seasonNumber);
            SetTeamOptions(_seasons);
            SetSelectedTeam(_seasonStatsParameters.teamId);
            SetPageNumberInfo(seasonParameters.pageNumber);

            SetStatsForPage();
            TotalPages = GetTotalPageCount();
            BoundCurrentPage();
        }
 public SkaterSeasonStatsModel(SeasonStatsParameters seasonParameters) : base(seasonParameters)
 {
 }
Пример #3
0
 public GoalieSeasonStatsModel(SeasonStatsParameters parameters) : base(parameters)
 {
 }
Пример #4
0
 public GoalieCareerStatsModel(SeasonStatsParameters seasonParameters) : base(seasonParameters)
 {
 }