/// <summary> /// Comparator Reports provide a comparative analysis of equipment systems for a given job. Where the 'CostCodeReport' assesses job completeness by /// referencing phase codes, the Comparator Report assesses the completeness in terms of inidividual equipment systems, broken into their constituent /// phase codes. /// </summary> /// <param name="reportedSystemsList"></param> /// <returns></returns> public ComparatorReport GetReportSummary(List <SystemReport> reportedSystemsList) { //Generate the data repository, which contains the Model and Report repositories, along with the ReportModel and EstimateModel. _dataRepository = DataRepository.LoadDataRepository(_jobNumber, reportedSystemsList); //Run the report; it is processed by default when the ModelReportingService is instantiated. _modelReportingService = ModelReportingService.LoadModelReportingService(_dataRepository.EstimateModel, _dataRepository.ReportModel, _dataProvider); return(_modelReportingService.GetCompleteModelReport());; }
/// <summary> /// Returns a completed CostCodeReport for the systems and job being reported. /// </summary> /// <param name="reportedSystemsList"></param> /// <returns></returns> public CostCodeReport GetCostCodeReportSummary(List <SystemReport> reportedSystemsList) { //Generate the data repository, which contains the Model and Report repositories, along with the ReportModel and EstimateModel. _dataRepository = DataRepository.LoadDataRepository(_jobNumber, reportedSystemsList); //Populate the ModelReportingService with the ReportModel, which is the only requirement for the CostCodeReport. ModelReportingService modelReportingService = new ModelReportingService(_dataRepository.ReportModel, _dataProvider); modelReportingService.GenerateCostCodeReport(_dataRepository.JobNumber); return(modelReportingService.GetCompleteCostCodeReport()); }
//CONSTRUCTOR public static ModelReportingService LoadModelReportingService(EstimateModel estimateModel, ReportModel reportModel, BudgetDataProvider dataProvider) { ModelReportingService modelReportingService = new ModelReportingService(); modelReportingService._reportModel = reportModel; modelReportingService._estimateModel = estimateModel; modelReportingService._dataProvider = dataProvider; try { modelReportingService.GenerateModelReport(); } catch (Exception e) { Console.WriteLine(e.Message); } return(modelReportingService); }