Files
BeWoPlaner/ReportImp/FeidPartnerReports/CollectiveBillingReportBthg.cs

67 lines
2.1 KiB
C#

using BeWo.Report.ReportObjects;
using DevExpress.XtraReports.UI;
using BS.Shared.Core;
using BeWo.Report;
using System.Collections.Generic;
using System.Text;
using System;
namespace FeidPartnerReports
{
[IDSpecificClass(Identifier = "SammelrechnungBthg")]
public partial class Invoice : XtraReport, IBeWoReport<ServiceInvoiceRO>
{
public Invoice()
{
this.InitializeComponent();
}
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
var sb = new StringBuilder();
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
sb.AppendLine(pRO.RecipientOrganisation);
}
if (!String.IsNullOrEmpty(pRO.RecipientAddressLine1))
{
sb.AppendLine(pRO.RecipientAddressLine1);
}
if (!String.IsNullOrEmpty(pRO.RecipientDivision))
{
sb.AppendLine(pRO.RecipientDivision);
}
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson) && pRO.RecipientContactPerson != pRO.RecipientOrganisation)
{
sb.AppendLine(pRO.RecipientContactPerson);
}
if (!String.IsNullOrEmpty(pRO.RecipientPoBox))
{
sb.AppendLine(pRO.RecipientPoBox);
}
if (!String.IsNullOrEmpty(pRO.RecipientStreet) && String.IsNullOrEmpty(pRO.RecipientPoBox))
{
sb.AppendLine(pRO.RecipientStreet);
}
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
{
sb.AppendLine("");
sb.AppendLine(pRO.RecipientPostCodeAndTown);
}
lblAdresse.Text = sb.ToString();
pRO.InvoiceBase.DueDate = pRO.InvoiceDateTime.Value.AddDays(14);
lblAbrechnungstext.Text = String.Format("Abrechnung Kontingent\nAbrechnung Betreutes Wohnen, " +
"Monatsrechnung gemäß beigefügter Aufstellung,\nMonat {0:MMMM yyyy}", pRO.AccountingPeriodEnd);
this.bindingSource1.DataSource = pRO;
}
}
}