Files
BeWoPlaner/ReportImp/ProBeWoDueren/ServicesOverviewReport.cs
2018-03-02 16:34:24 +01:00

46 lines
1.3 KiB
C#

using System;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using System.Collections.Generic;
namespace ProBeWoDueren
{
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 (ServicesOverviewRO.ServiceDetail s in pRO.Services)
{
if (s.IsBillable)
servicesBillable.Add(s);
if (s.IsGroup)
{
s.Notice5 = String.Format("{0}/{1} {2:0.##}", s.GroupMinutes, s.CustomerCount,
s.Minutes);
s.ServiceCategory = "Gruppe";
}
else
{
s.Notice5 = String.Format("{0}", s.Minutes);
}
}
pRO.Services = servicesBillable;
}
this.bindingSource1.DataSource = pRO;
}
}
}