49 lines
1.6 KiB
C#
49 lines
1.6 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;
|
|
double fehlkontakt = 0;
|
|
|
|
foreach (var s in pRO.Services)
|
|
{
|
|
if (s.IsBillable)
|
|
{
|
|
if (s.ServiceDescription.ToLower().Contains("fehlkontakt"))
|
|
{
|
|
s.ServiceCategoryAbbr = "Fehlkontakt";
|
|
fehlkontakt += s.FLSQualified;
|
|
}
|
|
else
|
|
{
|
|
billable += s.FLSQualified;
|
|
}
|
|
}
|
|
else
|
|
notBillable += s.FLSQualified;
|
|
}
|
|
|
|
labelAbrechenbarWert.Text = billable * 60 + " FLM / " + string.Format("{0:0.00}", billable) + " FLS";
|
|
labelNichtAbrechenbarWert.Text = notBillable * 60 + " FLM / " + string.Format("{0:0.00}", notBillable) + " FLS";
|
|
labelFehlkontakteWert.Text = fehlkontakt * 60 + " FLM / " + string.Format("{0:0.00}", fehlkontakt) + " FLS";
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
}
|