Files
BeWoPlaner/ReportImp/IntegraHeinsbergReports/ServiceInvoiceReport.cs
2017-06-11 16:01:01 +02:00

57 lines
1.8 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.IntegraHeinsbergReports
{
public partial class ServiceInvoiceReport : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServiceInvoiceRO>
{
public ServiceInvoiceReport()
{
InitializeComponent();
}
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
pRO.AccountingPeriod = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}", pRO.AccountingPeriodStart,
pRO.AccountingPeriodEnd);
StringBuilder sb = new StringBuilder();
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
{
sb.AppendLine(pRO.RecipientOrganisation);
}
if (!String.IsNullOrEmpty(pRO.RecipientDivision))
{
sb.AppendLine(pRO.RecipientDivision);
}
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
{
sb.AppendLine(pRO.RecipientContactPerson);
}
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
{
sb.AppendLine(pRO.RecipientStreet);
}
if (!String.IsNullOrEmpty(pRO.RecipientPoBox))
{
sb.Append("Postfach ");
sb.AppendLine(pRO.RecipientPoBox.Replace("Postfach", "").Trim());
}
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
{
sb.AppendLine(pRO.RecipientPostCodeAndTown);
}
lblAnschrift.Text = sb.ToString();
this.bindingSource1.DataSource = pRO;
}
}
}