Files
BeWoPlaner/ReportImp/ApiBerlin/ApiReportCreator.cs
Christian 023ca37cdc cb
2017-12-11 14:31:59 +01:00

34 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using DevExpress.XtraReports.UI;
namespace ApiBerlin
{
public class ApiReportCreator : DefaultReportCreator
{
public override XtraReport CreateAuslastungReport(long? employeeOid, IList<long> teamOids, DateTime startDate, DateTime endDate)
{
IBeWoReport<MitarbeiterauslastungRO> report;
if (teamOids != null && teamOids.Count > 0)
report = FindReportImp<MitarbeiterauslastungRO>("Teamauslastung");
else
report = FindReportImp<MitarbeiterauslastungRO>("Mitarbeiterauslastung");
if (startDate.Year == 2007)
{
startDate = new DateTime(2018, startDate.Month, 1);
endDate = startDate.AddMonths(1);
}
var x = MitarbeiterauslastungRO.Create(employeeOid, teamOids, startDate, endDate);
report.SetReportDataSource(x);
return report as XtraReport;
}
}
}