Example #1
0
 public byte[] GetRunExcelReport(ExcelReportRunModel run)
 {
     using (var reportBuilder = new ExcelReportBuilder(new ExcelStyleApplier()))
     {
         reportBuilder.PredefineStyles(GamePlanReportStyles.RunReportPredefineStyles);
         foreach (var scenario in run.Scenarios)
         {
             reportBuilder.Sheet(scenario.Name, sb =>
             {
                 var columnsCount = scenario.MaxColumnsCount;
                 SetColumnsWidthForRunReport(sb, columnsCount);
                 WriteGrid(sb, scenario.ScenarioDetails);
                 sb.Skip();
                 WriteGrid(sb, scenario.SalesAreaPassPriorities);
                 sb.Skip();
                 WriteGrid(sb, scenario.General);
                 sb.Skip();
                 WriteGrid(sb, scenario.Weighting);
                 sb.Skip();
                 WriteGrid(sb, scenario.Tolerance);
                 sb.Skip();
                 WriteGrid(sb, scenario.Rules);
                 sb.Skip();
                 WriteGrid(sb, scenario.ProgrammeRepetitions);
                 sb.Skip();
                 WriteGrid(sb, scenario.MinRatingPoints);
                 sb.Skip();
                 WriteGrid(sb, scenario.BreakExclusions);
                 sb.Skip();
                 WriteGrid(sb, scenario.SlottingLimits);
             });
         }
         return(reportBuilder.Save());
     }
 }
Example #2
0
 public byte[] GetSmoothFailuresExcelReport(ExcelReportSmoothFailuresModel reportModel)
 {
     using (var builder = new ExcelReportBuilder(new ExcelStyleApplier()))
     {
         return(builder
                .PredefineStyles(GamePlanReportStyles.SmoothFailuresReportPredefineStyles)
                .Sheet("Smooth Failures", sb => GetSmoothFailures(sb, reportModel.SmoothFailures))
                .Sheet("Report Info", sb => GetReportInfo(sb, "Smooth Failures", reportModel.Run, reportModel.ReportDate))
                .Save());
     }
 }