using System; using System.Collections.Generic; using BeWo.Report; using BeWo.Report.ReportObjects; namespace Humanitas { public partial class Stundenzettel : DevExpress.XtraReports.UI.XtraReport, IBeWoReport { public Stundenzettel() { InitializeComponent(); } public void SetReportDataSource(ServicesOverviewRO pRO) { if (pRO.Services != null) { List servicesBillable = new List(); foreach (var sd in pRO.Services) { if (sd.IsBillable) { if (sd.ServiceDescription.ToLower().Contains("fehlkontakt")) { sd.Notice5 = "Fehlkontakt"; } else if (sd.IsGroup) { sd.Notice5 = String.Format("{0} Teilnehmer", sd.CustomerCount); } servicesBillable.Add(sd); } } pRO.Services = servicesBillable; } this.bindingSource1.DataSource = pRO; } } }