47 lines
1.6 KiB
C#
47 lines
1.6 KiB
C#
using System;
|
|
using System.Text;
|
|
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)
|
|
{
|
|
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();
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
} |