public virtual ActionResult Edit(long id) { var season = _seasonService.GetById(id); var model = Mapper.Map <SeasonViewModel>(season); return(View(model)); }
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)); }
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())); }