Files
BeWoPlaner/ReportImp/SeverinReports/ServicesOverviewReport.cs
2021-08-12 14:51:13 +02:00

38 lines
1.3 KiB
C#

using System;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
namespace BeWo.SeverinReports
{
public partial class Stundenzettel : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
{
public Stundenzettel()
{
InitializeComponent();
}
public void SetReportDataSource(ServicesOverviewRO pRO)
{
double billable = 0;
double notBillable = 0;
foreach (var s in pRO.Services)
{
if (s.IsBillable)
billable += s.FLSQualified;
else
notBillable += s.FLSQualified;
}
//labelAbrechenbarText.Text = cb.CostBearer.Organisation.Name + "-direkte abrechenbare Leistung:";
labelAbrechenbarWert.Text = billable * 60 + " FLM / " + string.Format("{0:0.00}", billable) + " FLS";
//labelNichtAbrechenbarText.Text = "Mittelbare nicht abrechenbare Leistung:";
labelNichtAbrechenbarWert.Text = notBillable * 60 + " FLM / " + string.Format("{0:0.00}", notBillable) + " FLS";
this.bindingSource1.DataSource = pRO;
}
}
}