Files
BeWoPlaner/ReportImp/AidshilfeDortmund/ServicesOverviewReportAlt.cs

50 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using BeWo.Report;
using BeWo.Report.ReportObjects;
namespace BeWo.AidshilfeDortmund
{
public partial class Stundenzettel : DevExpress.XtraReports.UI.XtraReport // , IBeWoReport<ServicesOverviewRO> ab 16.05.2023 abgeändert auf Standard
{
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);
}
}
foreach (var sdd in pRO.ServicesDouble)
{
if (sdd.ServiceDescription != null && sdd.ServiceDescription.Contains("Fehlkontakt"))
{
sdd.ServiceCategoryAbbr = "Fehlkontakt";
}
if (sdd.ServiceDescription2 != null && sdd.ServiceDescription2.Contains("Fehlkontakt"))
{
sdd.ServiceCategoryAbbr2 = "Fehlkontakt";
}
}
lblGesamtminuten.Text = String.Format("Fachleistung in Minuten gesamt: {0:0.##} (ohne Faktor {1:0.##})", pRO.TotalFLMBillable, pRO.RateFactor);
pRO.Services = servicesBillable;
}
bindingSource1.DataSource = pRO;
}
}
}