private void WriteTimeColumn(ExcelDoc doc, RaceReport report) { for (int i = 0; i < report.Results.Count(); i++) { doc.WriteToCell(0, 1, "Time:"); doc.WriteToCell(i + 1, 1, report.Results[i].FinishingTime.ToString()); } }
private void WritePlaceColumn(ExcelDoc doc, RaceReport report) { for (int i = 0; i < report.Results.Count(); i++) { doc.WriteToCell(0, 2, "Place:"); doc.WriteToCell(i + 1, 2, report.Results[i].Place.ToString()); } }
private void WriteNameColumn(ExcelDoc doc, RaceReport report) { for (int i = 0; i < report.Results.Count(); i++) { var currentRunnerId = report.Results[i].Runner.Id; var currentRunner = _context.Runners.SingleOrDefault(r => r.Id == currentRunnerId); doc.WriteToCell(0, 0, "Name:"); doc.WriteToCell(i + 1, 0, currentRunner.Name); } }