using System; using System.Drawing; using System.Collections; using System.ComponentModel; using DevExpress.XtraReports.UI; using BeWo.Report.ReportObjects; using BeWo.Report; using System.Linq; using BS.Shared.Extensions; namespace TeamPfeil { public partial class Klientenstammblatt : DevExpress.XtraReports.UI.XtraReport, IBeWoReport { public Klientenstammblatt() { InitializeComponent(); } public void SetReportDataSource(CustomerDataRO pRO) { if (pRO.Customer.AusweisUnbefristetGueltig.HasValue && pRO.Customer.AusweisUnbefristetGueltig.Value) lblAusweisGueltigBis.Text = "unbefristet"; else if (pRO.Customer.AusweisGueltigBis.HasValue) lblAusweisGueltigBis.Text = string.Format("{0:dd.MM.yyyy}", pRO.Customer.AusweisGueltigBis.Value); else lblAusweisGueltigBis.Text = "-"; if (pRO.Customer.MerkzeichenListe != null && pRO.Customer.MerkzeichenListe.Count > 0) lblMerkzeichen.Text = string.Join("; ", pRO.Customer.MerkzeichenListe); if (pRO.Customer.BehinderungsartenListe != null && pRO.Customer.BehinderungsartenListe.Count > 0) lblBehinderungsarten.Text = string.Join("; ", pRO.Customer.BehinderungsartenListe); if (pRO.Customer.RelatedEmployees != null && pRO.Customer.RelatedEmployees.Count > 0) { pRO.Customer.RelatedEmployees.RemoveRange(pRO.Customer.RelatedEmployees.Where(e => e.EndDate.HasValue && e.EndDate < DateTime.Now).ToList()); } this.bindingSource1.DataSource = pRO; } } }