Files
BeWoPlaner/ReportImp/AlphaEv/InvoiceCustomerReport.cs
2018-04-27 14:23:43 +02:00

45 lines
1.3 KiB
C#

using System;
using System.Text;
using System.Windows.Forms.VisualStyles;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using DevExpress.XtraReports.UI;
namespace AlphaEv
{
public partial class InvoiceCustomerReport : XtraReport, IBeWoReport<InvoiceCustomerRO>
{
public InvoiceCustomerReport()
{
this.InitializeComponent();
}
public void SetReportDataSource(InvoiceCustomerRO pRO)
{
StringBuilder sb = new StringBuilder();
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
sb.AppendLine(pRO.RecipientOrganisation);
}
if (!String.IsNullOrEmpty(pRO.CustomerSalutation))
{
sb.AppendLine(pRO.CustomerSalutation);
}
sb.AppendLine(String.Format("{0} {1}", pRO.CustomerFirstName, pRO.CustomerLastName));
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
{
sb.AppendLine(pRO.RecipientStreet);
}
sb.AppendLine("");
sb.AppendLine(String.Format("{0} {1}", pRO.CustomerPostCode, pRO.CustomerTown));
lblAdresse.Text = sb.ToString();
this.bindingSource1.DataSource = pRO;
}
}
}