68 lines
2.1 KiB
C#
68 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
using BeWo.Report;
|
|
using BeWo.Report.ReportObjects;
|
|
|
|
using DevExpress.XtraPrinting;
|
|
using DevExpress.XtraReports.UI;
|
|
|
|
namespace BeWo.Convoi
|
|
{
|
|
public partial class Stundenzettel : XtraReport, IBeWoReport<ServicesOverviewRO>
|
|
{
|
|
public Stundenzettel()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(ServicesOverviewRO pRO)
|
|
{
|
|
bool hatGruppen = false;
|
|
|
|
if (pRO.Services != null)
|
|
{
|
|
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
|
|
|
|
foreach (var sd in pRO.Services)
|
|
{
|
|
if (sd.IsBillable || sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt"))
|
|
{
|
|
ServicesOverviewRO.CreateSignatureString(sd);
|
|
sd.Notice5 = "E";
|
|
if (sd.IsGroup)
|
|
{
|
|
sd.Notice5 = "GR";
|
|
hatGruppen = true;
|
|
}
|
|
if (sd.ServiceDescription.ToLower().Contains("fehlkontakt") || sd.ServiceCategory.ToLower().Contains("fehlkontakt") || (sd.ProzentAbrechenbar < 100))
|
|
{
|
|
sd.Notice5 = "F";
|
|
}
|
|
servicesBillable.Add(sd);
|
|
}
|
|
}
|
|
|
|
pRO.Services = servicesBillable;
|
|
}
|
|
|
|
if (!String.IsNullOrEmpty(pRO.AbsenceTimes))
|
|
{
|
|
pRO.AbsenceTimes = "Abwesenheit: " + pRO.AbsenceTimes;
|
|
}
|
|
else
|
|
{
|
|
lblHatAbwesenheiten.Text = "X";
|
|
}
|
|
|
|
if (!hatGruppen)
|
|
{
|
|
lblHatGruppen.Text = "X";
|
|
}
|
|
|
|
bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
}
|