85 lines
3.1 KiB
C#
85 lines
3.1 KiB
C#
using System;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
using BS.Shared.Core;
|
|
using BeWo.Report.ReportObjects;
|
|
using System.Text;
|
|
using BS.Shared;
|
|
using BeWo.Report;
|
|
|
|
namespace LebensWert
|
|
{
|
|
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);
|
|
|
|
foreach (var sc in c.SupportConcepts)
|
|
{
|
|
if (sc.IsActive == ActivationTypeId.Active)
|
|
{
|
|
foreach (var c2s in sc.CostBearer2SupportConceptList)
|
|
{
|
|
|
|
if (c2s.StartDate <= DateTime.Now && c2s.EndDate >= DateTime.Now)
|
|
{
|
|
lblHilfeplan.Text = c2s.CostBearer.Organisation.Name;
|
|
foreach (var ap in c2s.ApprovalPeriodList)
|
|
{
|
|
if (ap.StartDate <= DateTime.Now && ap.EndDate >= DateTime.Now)
|
|
{
|
|
lblBewilligtVon.Text = String.Format("{0:dd.MM.yyyy}", ap.StartDate);
|
|
lblBewilligtBis.Text = String.Format("{0:dd.MM.yyyy}", ap.EndDate);
|
|
lblFls.Text = String.Format("{0:0.00}", ap.ApprovedBEPerInterval);
|
|
lblFlsEinheit.Text = ap.ApprovedBEInterval != null ? EnumTranslations.SupportConceptApprovalInterval2Translations[(SupportConceptApprovalInterval)ap.ApprovedBEInterval] : null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (c.Pflegegrad.HasValue)
|
|
lblPflegegrad.Text = EnumTranslations.PflegegradTranslations[c.Pflegegrad];
|
|
else
|
|
{
|
|
lblPflegegrad.Text = "";
|
|
}
|
|
|
|
if (c.AssistanceBegin.HasValue)
|
|
{
|
|
lblBetreuungsbeginn.Text = String.Format("{0:dd.MM.yyyy}", c.AssistanceBegin);
|
|
}
|
|
else
|
|
{
|
|
lblBetreuungsbeginn.Text = "";
|
|
}
|
|
|
|
StringBuilder betreuungsartSb = new StringBuilder();
|
|
|
|
foreach (var v2o in c.ValueList)
|
|
{
|
|
if (v2o.Entry.Type == ValueListEntryType.CustomerCareType)
|
|
{
|
|
if (betreuungsartSb.Length > 0)
|
|
{
|
|
betreuungsartSb.Append(", ");
|
|
}
|
|
betreuungsartSb.Append(v2o.Entry.Value);
|
|
}
|
|
}
|
|
|
|
lblBetreuungsart.Text = betreuungsartSb.ToString();
|
|
lblMedikation.Text = c.Medication;
|
|
|
|
bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
}
|
|
}
|