Files
BeWoPlaner/ReportImp/MobileEV/ServiceInvoiceReport.cs

56 lines
1.9 KiB
C#
Raw Normal View History

2022-11-25 13:16:31 +01:00
using System;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using DevExpress.XtraReports.UI;
2024-02-01 10:33:54 +01:00
using System.Text;
2022-11-25 13:16:31 +01:00
2023-01-12 11:42:12 +01:00
namespace MobileEV
2022-11-25 13:16:31 +01:00
{
public partial class ServiceInvoiceReport : XtraReport, IBeWoReport<ServiceInvoiceRO>
{
public ServiceInvoiceReport()
{
this.InitializeComponent();
}
public void SetReportDataSource(ServiceInvoiceRO pRO)
{
DateTime start = pRO.AccountingPeriodStart;
DateTime end = pRO.AccountingPeriodEnd;
if (start.Month == end.Month && start.Year == end.Year)
{
lblAbrechnungszeitraum.Text = String.Format("hiermit berechnen wir f<>r den Monat {0:MMMM yyyy} folgende erbrachte T<>tigkeiten:", start);
}
else
{
lblAbrechnungszeitraum.Text = String.Format("hiermit berechnen wir f<>r den Zeitraum {0:MMMM yyyy} - {1:MMMM yyyy} folgende erbrachte T<>tigkeiten:", start, end);
}
2024-02-01 10:33:54 +01:00
StringBuilder sb = new StringBuilder();
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) && pRO.RecipientOrganisation != "SELBSTZAHLER")
{
sb.AppendLine(pRO.RecipientOrganisation);
}
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
{
sb.AppendLine(pRO.RecipientContactPerson);
}
if (!String.IsNullOrEmpty(pRO.RecipientDivision) && !String.IsNullOrEmpty(pRO.RecipientOrganisation) && pRO.RecipientOrganisation != "SELBSTZAHLER")
{
sb.AppendLine(pRO.RecipientDivision);
}
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
{
sb.AppendLine(pRO.RecipientStreet);
}
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
{
sb.AppendLine(pRO.RecipientPostCodeAndTown);
}
lblAdresse.Text = sb.ToString();
2022-11-25 13:16:31 +01:00
this.bindingSource1.DataSource = pRO;
}
}
}