using System; using System.Collections.Generic; using System.Linq; using BeWo.Report; using BeWo.Report.ReportObjects; using DevExpress.XtraReports.UI; namespace BeWo.IBPReports { public partial class StundenzettelBeWo67 : XtraReport, IBeWoReport { public StundenzettelBeWo67() { InitializeComponent(); } public void SetReportDataSource(ServicesOverviewRO pRO) { double minTotal = 0; if (pRO.Services != null) { List servicesBillable = new List(); foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services) { if (s.IsBillable) { if (s.ServiceCategory.StartsWith("Direkt")) { minTotal += s.Minutes; } servicesBillable.Add(s); } } pRO.Services = servicesBillable; } MittelbareLeistungenReport subReport = xrSubreport1.ReportSource as MittelbareLeistungenReport; if (subReport != null) subReport.SetReportDataSource(pRO); bindingSource1.DataSource = pRO; // rechnungsDatum.Text = DateTime.Now.ToShortDateString(); summeMinuten.Text = string.Format("{0:0.##}", minTotal); if (pRO.SupportConceptCostBearer != null) aktenzeichenLV.Text = pRO.SupportConceptCostBearer.CustomerReferenceNumber ?? string.Empty; bewilligteFLSW.Text = string.Format("{0:0.##}", pRO.ApprovedFLSPerWeek); } } }