59 lines
2.0 KiB
C#
59 lines
2.0 KiB
C#
using BeWo.Report.ReportObjects;
|
|
using BS.Shared.Core;
|
|
using BS.Shared.Extensions;
|
|
using DevExpress.XtraReports.UI;
|
|
using System;
|
|
using System.Text;
|
|
|
|
namespace VereinZurIntegrationChemnitz
|
|
{
|
|
//[IDSpecificClass(Identifiers = new string[] { "RechnungABW67" })]
|
|
public partial class RechnungABW67 : XtraReport, IBeWoReport<ServiceInvoiceRO>
|
|
{
|
|
public RechnungABW67()
|
|
{
|
|
this.InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
|
{
|
|
SetzeAdresse(pRO);
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
|
|
private void SetzeAdresse(ServiceInvoiceRO pRO)
|
|
{
|
|
StringBuilder sb = new StringBuilder();
|
|
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) && pRO.RecipientOrganisation.ToLower().Trim() != "selbstzahler")
|
|
{
|
|
sb.AppendLine(pRO.RecipientOrganisation);
|
|
}
|
|
//if (!String.IsNullOrEmpty(pRO.RecipientAddressLine1))
|
|
//{
|
|
// sb.AppendLine(pRO.RecipientAddressLine1);
|
|
//}
|
|
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
|
|
{
|
|
sb.AppendLine(pRO.RecipientContactPerson);
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.RecipientDivision) && !String.IsNullOrEmpty(pRO.RecipientOrganisation) && pRO.RecipientOrganisation.ToLower().Trim() != "selbstzahler")
|
|
{
|
|
sb.AppendLine(pRO.RecipientDivision);
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.RecipientPoBox))
|
|
{
|
|
sb.AppendLine(pRO.RecipientPoBox);
|
|
}
|
|
else if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
|
{
|
|
sb.AppendLine(pRO.RecipientStreet);
|
|
}
|
|
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
|
|
{
|
|
sb.AppendLine(pRO.RecipientPostCodeAndTown);
|
|
}
|
|
lblAdresse.Text = sb.ToString();
|
|
}
|
|
}
|
|
} |