Exemple #1
0
        public async Task<IReporter> GetReporter(CalculateRequest calcRequest, int drillMonth, string logoPath)
        {
            this.calculateRequest = calcRequest;
            var report = new Reporter();
            var periods = Utils.GetZeitraume(calculateRequest.Stichtag);

            report.AddNewSection();
            report = await this.CreateHeader(report, logoPath);
            report.AddInfo();
            report.AddJahresbetrachtung(await meteoGtzService.GetGtzYearsSum(this.calculateRequest, true));

            var results = (await meteoGtzService.GetRelativeVerteilung(this.calculateRequest, false)).ToList();
            var dt = results.ToDataTable();
            report.AddMonatsbetrachtung(dt, periods);

            var tempData = drillMonth > 0 ?
                await this.klimaService.GetTemperaturMohtsDrill(calculateRequest, drillMonth) :
                await this.klimaService.GetTemperaturGroupedByPeriods(calculateRequest);

            
            report.AddTagesmitteltemperaturen(tempData.ToList(), periods);

            report.AddSpacing(30);
            report.AddRemarks();
            return report;
        }