Files
BeWoPlaner/ReportImp/Alloheim/ServiceInvoiceReport.cs

44 lines
1.4 KiB
C#

using System;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using DevExpress.XtraReports.UI;
namespace Alloheim
{
public partial class ServiceInvoiceReport : XtraReport, IBeWoReport<ServiceInvoiceRO>
{
public ServiceInvoiceReport()
{
this.InitializeComponent();
}
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
Customer customer = null;
if (pRO.CustomerOid.HasValue)
{
customer = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.CustomerOid.Value);
}
if (customer != null)
{
lblPflegegrad.Text = customer.Pflegegrad?.ToString();
lblVersichertenNr.Text = customer.InsuranceNumber;
}
SupportConcept supportConcept = null;
if (pRO.ServiceInvoicePeriods.Count > 0)
{
var c2s = pRO.ServiceInvoicePeriods[0].CostBearer2SupportConcept;
supportConcept = c2s.SupportConcept;
//lblBelegNr = supportConcept.
lblHpStart.Text = supportConcept.StartDate?.ToString("dd.MM.yyyy");
lblHpEnd.Text = supportConcept.EndDate?.ToString("dd.MM.yyyy");
}
this.bindingSource1.DataSource = pRO;
}
}
}