49 lines
1.7 KiB
C#
49 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using BeWo.Report;
|
|
using BeWo.Report.ReportObjects;
|
|
|
|
namespace LeWoAachen
|
|
{
|
|
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>();
|
|
|
|
double flMinutes = 0;
|
|
double fkMinutes = 0;
|
|
|
|
foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
|
|
{
|
|
if (s.IsBillable || s.ServiceDescription.ToLower().Contains("fehlkontakt") || s.ServiceCategory.ToLower().Contains("fehlkontakt"))
|
|
{
|
|
if (s.ServiceDescription.ToLower().Contains("fehlkontakt") || s.ServiceCategory.ToLower().Contains("fehlkontakt") || (s.ProzentAbrechenbar < 100))
|
|
{
|
|
s.Notice4 = String.Format("{0}", s.Minutes);
|
|
fkMinutes += s.Minutes;
|
|
}
|
|
else
|
|
{
|
|
s.Notice3 = String.Format("{0}", s.Minutes);
|
|
flMinutes += s.Minutes;
|
|
}
|
|
|
|
servicesBillable.Add(s);
|
|
}
|
|
}
|
|
|
|
pRO.Services = servicesBillable;
|
|
}
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
}
|