Example #1
0
        public async Task <IActionResult> Markers(int competitionId, int competitionInstanceId, int eventId, int heatId)
        {
            await _markerService.GetMarkersFromTimingDb(competitionInstanceId);

            var assignedMarkers = _markerService.GetMarkersForHeat(heatId);
            var markerList      = _markerService.GetUnAssignedMarkersForHeat(heatId, competitionInstanceId);
            var competition     = await _competitionService.GetCompetitionByIdAsync(competitionId);

            var competitionInstance = await _competitionService.GetCompetitionInstanceByIdAsync(competitionInstanceId);

            var _event = await _eventService.GetEventByIdAsync(eventId);

            var heat = await _heatService.GetHeatByIdAsync(heatId);

            var data = new MarkerDto
            {
                AssignedMarkers         = assignedMarkers,
                MarkerList              = markerList,
                CompetitionName         = competition.Name,
                CompetitionInstanceName = competitionInstance.Name,
                EventName  = _event.Name,
                HeatNumber = heat.HeatNumber
            };

            return(View(data));
        }