Files
BeWoPlaner/ReportImp/GrundsteinEV/ServiceInvoiceReport.cs

47 lines
1.6 KiB
C#
Raw Permalink Normal View History

2022-01-10 15:21:21 +01:00
using System;
2022-05-09 16:06:31 +02:00
using System.Text;
2022-01-10 15:21:21 +01:00
using BeWo.Report;
using BeWo.Report.ReportObjects;
using DevExpress.XtraReports.UI;
namespace GrundsteinEV
{
public partial class ServiceInvoiceReport : XtraReport, IBeWoReport<ServiceInvoiceRO>
{
public ServiceInvoiceReport()
{
this.InitializeComponent();
}
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
2022-05-09 16:06:31 +02:00
StringBuilder sb = new StringBuilder();
if (!String.IsNullOrEmpty(pRO.RecipientAddressLine1) && !String.IsNullOrEmpty(pRO.RecipientAddressLine1.Trim()) && pRO.RecipientOrganisation.Contains(pRO.CustomerLastName))
{
sb.AppendLine(pRO.RecipientAddressLine1);
}
else if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) && !String.IsNullOrEmpty(pRO.RecipientOrganisation.Trim()))
{
sb.AppendLine(pRO.RecipientOrganisation);
}
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson) && !String.IsNullOrEmpty(pRO.RecipientContactPerson.Trim()))
{
sb.AppendLine(pRO.RecipientContactPerson);
}
if (!String.IsNullOrEmpty(pRO.RecipientDivision) && !String.IsNullOrEmpty(pRO.RecipientDivision.Trim()))
{
sb.AppendLine(pRO.RecipientDivision);
}
if (!String.IsNullOrEmpty(pRO.RecipientStreet) && !String.IsNullOrEmpty(pRO.RecipientStreet.Trim()))
{
sb.AppendLine(pRO.RecipientStreet);
}
lblAdresse.Text = sb.ToString();
2022-01-10 15:21:21 +01:00
this.bindingSource1.DataSource = pRO;
}
}
}