89 lines
2.7 KiB
C#
89 lines
2.7 KiB
C#
using System;
|
|
using System.Drawing;
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
using BeWo.Report;
|
|
using DevExpress.XtraReports.UI;
|
|
using BeWo.Report.ReportObjects;
|
|
using BS.Shared;
|
|
using BS.Shared.Core;
|
|
|
|
namespace BeWo.HausTheresia
|
|
{
|
|
public partial class Klientenstammblatt : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<CustomerDataRO>
|
|
{
|
|
public Klientenstammblatt()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(CustomerDataRO pRO)
|
|
{
|
|
var c = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.CustomerOid);
|
|
|
|
lblMedication.Text = c.Medication;
|
|
|
|
lblVersorgungsamt.Text = c.AusstVersAmt;
|
|
lblAusweisGueltigVon.Text = String.Format("{0:dd.MM.yyyy}", c.AusweisGueltigVon);
|
|
if (c.AusweisUnbefristetGueltig.HasValue && c.AusweisUnbefristetGueltig.Value)
|
|
{
|
|
lblAusweisGueltigBis.Text = "unbefristet";
|
|
}
|
|
else
|
|
{
|
|
lblAusweisGueltigBis.Text = String.Format("{0:dd.MM.yyyy}", c.AusweisGueltigBis);
|
|
}
|
|
lblBeiblattGueltigBis.Text = String.Format("{0:dd.MM.yyyy}", c.BeiblattGueltigBis);
|
|
lblGrad.Text = c.GradDerBehinderung;
|
|
|
|
String merkzeichen = "";
|
|
if (c.MerkzeichenListe != null)
|
|
{
|
|
foreach (var mz in c.MerkzeichenListe)
|
|
{
|
|
if (merkzeichen.Length > 0)
|
|
{
|
|
merkzeichen += ", ";
|
|
}
|
|
merkzeichen += Translate(mz);
|
|
}
|
|
}
|
|
lblMerkzeichen.Text = merkzeichen;
|
|
|
|
String bastr = "";
|
|
if (c.BehinderungsartenListe != null)
|
|
{
|
|
foreach (var ba in c.BehinderungsartenListe)
|
|
{
|
|
if (bastr.Length > 0)
|
|
{
|
|
bastr += ", ";
|
|
}
|
|
bastr += Translate(ba);
|
|
}
|
|
}
|
|
lblBehinderungsart.Text = bastr;
|
|
|
|
if (c.Pflegegrad.HasValue)
|
|
lblPflegegrad.Text = EnumTranslations.PflegegradTranslations[c.Pflegegrad];
|
|
else
|
|
{
|
|
lblPflegegrad.Text = "";
|
|
}
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
|
|
private string Translate(Behinderungsart ba)
|
|
{
|
|
return EnumTranslations.BehinderungsartTranslations[ba];
|
|
}
|
|
|
|
private string Translate(Merkzeichen mz)
|
|
{
|
|
return EnumTranslations.MerkzeichenTranslations[mz];
|
|
}
|
|
}
|
|
}
|