Files
BeWoPlaner/ReportImp/BeWoRimbach/ServiceInvoiceReport.cs
Christian 418f40606f cb
2021-12-09 15:51:43 +01:00

35 lines
1.1 KiB
C#

using System;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using DevExpress.XtraReports.UI;
namespace BeWoRimbach
{
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);
}
DateTime datum = pRO.InvoiceDateTime.Value.AddDays(14);
lblNotice.Text = lblNotice.Text.Replace("[Zahlungsziel]", String.Format("{0:dd.MM.yyyy}", datum));
this.bindingSource1.DataSource = pRO;
}
}
}