Files
BeWoPlaner/ReportImp/SprungbrettReports/ServicesOverviewReport.cs

46 lines
1.4 KiB
C#
Raw Normal View History

using System.Collections.Generic;
2016-06-27 01:45:38 +02:00
using BeWo.Report;
using BeWo.Report.ReportObjects;
2016-06-27 01:45:38 +02:00
namespace BeWo.SprungbrettReports
{
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)
{
ServicesOverviewRO.CreateSignatureString(sd);
sd.Notice5 = "";
if (sd.ServiceDescription.ToLower().Contains("fehlkontakt"))
{
sd.Notice5 = "Fehlkontakt";
}
}
else
{
sd.Notice5 = "nicht abrechenbar";
}
servicesBillable.Add(sd);
}
pRO.Services = servicesBillable;
}
2016-06-27 01:45:38 +02:00
this.bindingSource1.DataSource = pRO;
2016-06-27 01:45:38 +02:00
}
}
}