コード例 #1
0
        public virtual ActionResult Edit(long id)
        {
            var season = _seasonService.GetById(id);
            var model  = Mapper.Map <SeasonViewModel>(season);

            return(View(model));
        }
コード例 #2
0
        public virtual ActionResult LeaguesList(long seasonId)
        {
            var leagues = _leagueService.GetList();
            var season  = _seasonService.GetById(seasonId);

            var model = new LeagueListViewModel();

            model.Season  = Mapper.Map <SeasonViewModel>(season);
            model.Leagues = Mapper.Map <IEnumerable <LeagueViewModel> >(leagues);

            return(View(model));
        }
コード例 #3
0
        public virtual ActionResult List(long seasonId, long leagueId)
        {
            var season    = _seasonService.GetById(seasonId);
            var league    = _leagueService.GetById(leagueId);
            var matchDays = _matchDayService.GetList(leagueId);

            var model = new MatchDayDataSource();

            model.Season    = Mapper.Map <SeasonViewModel>(season);
            model.League    = Mapper.Map <LeagueViewModel>(league);
            model.MatchDays = Mapper.Map <List <MatchDayViewModel> >(matchDays);
            model.SetActions();

            return(View(MVC.Shared.Views._Grid, model.GetGridModel()));
        }