62 lines
2.0 KiB
C#
62 lines
2.0 KiB
C#
using System;
|
|
using System.Text;
|
|
using BeWo.Report;
|
|
using BeWo.Report.ReportObjects;
|
|
|
|
using DevExpress.XtraReports.UI;
|
|
|
|
namespace BeWo.VivaAVidaReports
|
|
{
|
|
public partial class ServiceInvoiceReport : XtraReport, IBeWoReport<ServiceInvoiceRO>
|
|
{
|
|
public ServiceInvoiceReport()
|
|
{
|
|
this.InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
|
{
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
|
|
{
|
|
sb.AppendLine(pRO.RecipientOrganisation);
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
|
|
{
|
|
sb.AppendLine(pRO.RecipientContactPerson);
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.RecipientDivision))
|
|
{
|
|
sb.AppendLine(pRO.RecipientDivision);
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
|
{
|
|
sb.AppendLine(pRO.RecipientStreet);
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
|
|
{
|
|
sb.AppendLine(pRO.RecipientPostCodeAndTown);
|
|
}
|
|
lblAdresse.Text = sb.ToString();
|
|
|
|
|
|
DateTime start = pRO.AccountingPeriodStart;
|
|
DateTime end = pRO.AccountingPeriodEnd;
|
|
lblAbrechnungszeitraum.Text = String.Format("Für den Zeitraum {0:MMMM yyyy} - {1:MMMM yyyy} berechnen wir folgende Leistungen:", start, end);
|
|
lblLeistunsart.Text = "Unterstützung im Alltag gem. § 45a SGB XI";
|
|
|
|
foreach (var sip in pRO.ServiceInvoicePeriods)
|
|
{
|
|
foreach (var ii in sip.ServiceInvoiceItems)
|
|
{
|
|
if (ii.ServiceDescription.Contains("Soziotherapeutisch"))
|
|
{
|
|
lblLeistunsart.Text = "Soziotherapeutische Leistungen gem. § 37a SGB V";
|
|
}
|
|
}
|
|
}
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
} |