Files
BeWoPlaner/ReportImp/HilfeDaheim2/InvoiceCustomerReport.cs
Christian 0480df61a8 CB 14.08.
2017-08-14 11:59:31 +02:00

54 lines
1.6 KiB
C#

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Text;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
namespace BeWo.SchillingerReports
{
public partial class InvoiceCustomerReport : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<InvoiceCustomerRO>
{
public InvoiceCustomerReport()
{
InitializeComponent();
}
public void SetReportDataSource(InvoiceCustomerRO pRO)
{
StringBuilder sb = new StringBuilder();
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
sb.AppendLine(pRO.RecipientOrganisation);
}
if (!String.IsNullOrEmpty(pRO.RecipientFirstName) || !String.IsNullOrEmpty(pRO.RecipientLastName))
{
sb.AppendLine(String.Format("{0} {1}", pRO.RecipientFirstName, pRO.RecipientLastName).Trim());
}
if (!String.IsNullOrEmpty(pRO.RecipientDivision))
{
sb.AppendLine(pRO.RecipientDivision);
}
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
{
sb.AppendLine(pRO.RecipientStreet);
}
if (!String.IsNullOrEmpty(pRO.RecipientPostCode))
{
sb.Append(pRO.RecipientPostCode);
sb.Append(" ");
}
if (!String.IsNullOrEmpty(pRO.RecipientTown))
{
sb.Append(pRO.RecipientTown);
}
lblAdresse.Text = sb.ToString();
this.bindingSource1.DataSource = pRO;
}
}
}