Ejemplo n.º 1
0
        public ActionResult GetMatchTable(int tourId, int expertId)
        {
            var headers = new List <string>()
            {
                "Дата", "Дома", "В гостях", "Прогноз"
            };
            //var matchlist = _matchService.GetLastTournamentMatchesByTourId(tourId).Select(m => m.GetDto()).ToList();
            var matchlist = _matchService.GetTourSchedule(tourId).Select(m => m.GetDto()).ToList();

            var scorelist  = _predictionService.GeneratePredictionlist(tourId, expertId);
            var matchTable = new MatchTableViewModel(headers, matchlist, scorelist);

            return(PartialView("MatchTable", matchTable));
        }
Ejemplo n.º 2
0
        public ActionResult EditPredictions(int tourId, int expertId = 1, bool addPredictionSuccess = false)
        {
            var experts = _expertService.GetExperts();
            var tourDto = _tourService.GetTourDto(tourId);
            //var matches = _matchService.GetLastTournamentMatchesByTourId(tourId).ToList();
            var matches   = _matchService.GetTourSchedule(tourId);
            var scorelist = _predictionService.GeneratePredictionlist(tourId, expertId, true);
            var viewModel = new EditPredictionsViewModel(matches, experts, scorelist, tourDto, expertId, addPredictionSuccess);

            return(View(viewModel));
        }