Beispiel #1
0
        public ActionResult Index(FixturesViewModel model)
        {
            if (model == null)
            {
                return(RedirectToAction("Index"));
            }

            // TODO Pass teams and season in request?
            model.PopulateData(
                competitionService.GetCurrentSeason().ToString(),
                teamService.GetTeamsForCurrentSeason(),
                competitionService.GetLeaguesForCurrentSeason(),
                cupService.GetCupsForCurrentSeason(),
                fixtureService.GetFixturesForCurrentSeasonFilter(model.FilterByTeamId, model.FilterByIsPlayed, model.IsFilteredByLeague(), model.IsFilteredByCup(), model.GetLeagueOrCupId())
                );

            return(View(model));
        }
        public ActionResult Index(FixturesViewModel model)
        {
            model.PopulateData(
                competitionService.GetCurrentSeason().ToString(),
                teamService.GetTeamsForCurrentSeason(),
                competitionService.GetLeaguesForCurrentSeason(),
                cupService.GetCupsForCurrentSeason(),
                fixtureService.GetFixturesForCurrentSeasonFilter(model.FilterByTeamId, model.FilterByIsPlayed, model.IsFilteredByLeague(), model.IsFilteredByCup(), model.GetLeagueOrCupId())
                );

            return(View(model));
        }