예제 #1
0
        public ActionResult FullReport()
        {
            var games = Context.Games.Where(
                g =>
                !g.CanceledOn.HasValue).
                OrderBy(g => g.Slot.StartDateTime);

            byte[] workbook = new GamesToExcelMapper().Map(games);

            return new FileContentResult(workbook, "application/excel")
            {
                FileDownloadName = "TSC_Games_Full.xlsx"
            };
        }
예제 #2
0
        public ActionResult ForRefereeAssignor()
        {
            var games = Context.Games.Where(
                g =>
                !g.CanceledOn.HasValue &&
                g.AreRefereesNeeded &&
                EntityFunctions.TruncateTime(g.Slot.StartDateTime) >= EntityFunctions.TruncateTime(DateTime.Now)).
                OrderBy(g => g.Slot.StartDateTime);

            byte[] workbook = new GamesToExcelMapper().Map(games);

            return new FileContentResult(workbook, "application/excel")
                       {
                           FileDownloadName = "TSC_Games_Referee.xlsx"
                       };
        }