Files
BeWoPlaner/ReportImp/ChristopherusHaus/ServicesOverviewReport.cs
2022-11-07 12:10:44 +01:00

50 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using DevExpress.XtraReports.UI;
namespace BeWo.ChristopherusHaus
{
public partial class Stundenzettel : XtraReport, IBeWoReport<ServicesOverviewRO>
{
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.StartDate.Second == 0)
{
s.TimeRangeString = String.Format("{0} - {1}", s.StartDate.ToShortTimeString(), s.EndDateNotRounded.ToShortTimeString());
}
if (s.IsBillable)
servicesBillable.Add(s);
ServicesOverviewRO.CreateGoalList(s);
}
pRO.Services = servicesBillable;
}
bindingSource1.DataSource = pRO;
// rechnungsDatum.Text = DateTime.Now.ToShortDateString();
//summeMinuten.Text = string.Format("{0:0.##}", pRO.TotalFLMBillable);
//if (pRO.SupportConceptCostBearer != null)
// aktenzeichenLV.Text = pRO.SupportConceptCostBearer.CustomerReferenceNumber ?? string.Empty;
//bewilligteFLSW.Text = string.Format("{0:0.##}", pRO.ApprovedFLSPerWeek);
}
}
}