Files
BeWoPlaner/ReportImp/TeamPfeil/CustomerDataReport.cs

38 lines
1.3 KiB
C#

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;
namespace TeamPfeil
{
public partial class Klientenstammblatt : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<CustomerDataRO>
{
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);
this.bindingSource1.DataSource = pRO;
}
}
}