Files
BeWoPlaner/ReportImp/Humanitas/ServicesOverviewReport.cs

45 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using BeWo.Report;
using BeWo.Report.ReportObjects;
namespace Humanitas
{
public partial class Stundenzettel : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
{
public Stundenzettel()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
if (pRO.Services != null)
{
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
foreach (var sd in pRO.Services)
{
if (sd.IsBillable)
{
if (sd.ServiceDescription.ToLower().Contains("fehlkontakt"))
{
sd.Notice5 = "Fehlkontakt";
}
else if (sd.IsGroup)
{
sd.Notice5 = String.Format("{0} Teilnehmer", sd.CustomerCount);
}
servicesBillable.Add(sd);
}
}
pRO.Services = servicesBillable;
}
this.bindingSource1.DataSource = pRO;
}
}
}