Files
BeWoPlaner/ReportImp/Wabe/RechnungBezirk.cs

58 lines
1.8 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 Wabe
{
//[IDSpecificClass(Identifier = "RgBezirk")]
public partial class Sammelrechnung : XtraReport, IBeWoReport<ServiceInvoiceRO>
{
public Sammelrechnung()
{
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.RecipientStreet))
{
sb.AppendLine(pRO.RecipientStreet);
}
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
{
sb.AppendLine(pRO.RecipientPostCodeAndTown);
}
lblAdresse.Text = sb.ToString();
if (pRO.RecipientOrganisation != null && pRO.RecipientOrganisation.Contains("Bezirk Mittelfranken")
&& pRO.AccountingPeriodStart > new DateTime(2025, 12, 31))
{
lblZeNummer.Text = "Rang.Nr. 40447";
}
this.bindingSource1.DataSource = pRO;
}
}
}