2021-08-16 12:19:22 +02:00
|
|
|
using System;
|
|
|
|
|
using System.Text;
|
2021-10-13 14:38:51 +02:00
|
|
|
using BeWo.Report;
|
2021-08-16 12:19:22 +02:00
|
|
|
using BeWo.Report.ReportObjects;
|
|
|
|
|
|
2021-10-13 14:38:51 +02:00
|
|
|
namespace SozialwerkAachenerChristen
|
2021-08-16 12:19:22 +02:00
|
|
|
{
|
|
|
|
|
public partial class InvoiceCustomerReport : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<InvoiceCustomerRO>
|
|
|
|
|
{
|
|
|
|
|
public InvoiceCustomerReport()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetReportDataSource(InvoiceCustomerRO pRO)
|
|
|
|
|
{
|
2021-10-13 14:38:51 +02:00
|
|
|
//if (String.IsNullOrEmpty(pRO.Notice))
|
|
|
|
|
//{
|
|
|
|
|
// lblNotice.Visible = false;
|
|
|
|
|
//}
|
2021-08-16 12:19:22 +02:00
|
|
|
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) && !String.IsNullOrEmpty(pRO.RecipientOrganisation.Trim()))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine(pRO.RecipientOrganisation);
|
|
|
|
|
}
|
|
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientDivision) && !String.IsNullOrEmpty(pRO.RecipientDivision.Trim()))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine(pRO.RecipientDivision);
|
|
|
|
|
}
|
2021-11-29 19:31:36 +01:00
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientSalutationAddressField) && !String.IsNullOrEmpty(pRO.RecipientSalutationAddressField.Trim()))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine(pRO.RecipientSalutationAddressField);
|
|
|
|
|
}
|
2021-08-16 12:19:22 +02:00
|
|
|
if ((!String.IsNullOrEmpty(pRO.RecipientFirstName) && !String.IsNullOrEmpty(pRO.RecipientFirstName.Trim()))
|
|
|
|
|
|| (!String.IsNullOrEmpty(pRO.RecipientLastName) && !String.IsNullOrEmpty(pRO.RecipientLastName.Trim())))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine(String.Format("{0} {1}", pRO.RecipientFirstName, pRO.RecipientLastName).Trim());
|
|
|
|
|
}
|
|
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientStreet) && !String.IsNullOrEmpty(pRO.RecipientStreet.Trim()))
|
|
|
|
|
{
|
|
|
|
|
sb.AppendLine(pRO.RecipientStreet);
|
|
|
|
|
}
|
|
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientPostCode) && !String.IsNullOrEmpty(pRO.RecipientPostCode.Trim()))
|
|
|
|
|
{
|
|
|
|
|
sb.Append(pRO.RecipientPostCode);
|
|
|
|
|
sb.Append(" ");
|
|
|
|
|
}
|
|
|
|
|
if (!String.IsNullOrEmpty(pRO.RecipientTown) && !String.IsNullOrEmpty(pRO.RecipientTown.Trim()))
|
|
|
|
|
{
|
|
|
|
|
sb.Append(pRO.RecipientTown);
|
|
|
|
|
}
|
2021-11-29 19:31:36 +01:00
|
|
|
lblAddresse.Text = sb.ToString();
|
2021-08-16 12:19:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|