public IEnumerable <GroupWithTime> Assign([FromBody] IEnumerable <Dto.TimingValue> timingValues) { var newTimingValues = ConvertTimingValuesDtoToModel(timingValues).ToList(); var currentRace = _raceService.LoadCurrentRace(); _timingValueService.SaveChangesToRaceFolder(currentRace, newTimingValues); _raceService.AddTimingValues(currentRace, newTimingValues); _raceService.CalculateFinishTimes(currentRace); _raceService.UpdateRace(currentRace); return(ConvertModelToDto(currentRace.Groups)); }
private void Finish() { PrintFinishMenu(); do { var input = ReadTrimAndSplit("Finish"); if (input[0] == "q" || input[0] == "quit") { break; } if (input[0] == "h") { PrintFinishMenu(); continue; } if (input[0] == "c") { var currentRace = _raceService.LoadCurrentRace(); DoAction(() => _raceService.CalculateFinishTimes(currentRace)); } //if (input[0] == "pg") { // PdfGenerator.PdfRenderer.GroupByClassAndOrder(CurrentContext.Race); //} //if (input[0] == "pa") { // PdfGenerator.PdfRenderer.Order(CurrentContext.Race); //} //if (input[0] == "sl") { // PdfGenerator.PdfRenderer.CreateStartList(CurrentContext.Race); //} } while (true); }