38 lines
1.6 KiB
C#
38 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using BeWo.Report;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Service.ServiceImplementations;
|
|
using DevExpress.XtraReports.UI;
|
|
|
|
namespace AwoKreisverbandPloen
|
|
{
|
|
public partial class RechnungVerpflegungskostenSelbstzahlerPreetz : XtraReport, IBeWoReport<ServiceInvoiceRO>
|
|
{
|
|
public RechnungVerpflegungskostenSelbstzahlerPreetz()
|
|
{
|
|
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("für den Monat {0:MMMM yyyy} berechnen wir Ihnen folgende Verpflegungskosten:", start);
|
|
}
|
|
else
|
|
{
|
|
lblAbrechnungszeitraum.Text = String.Format("für den Zeitraum {0:MMMM yyyy} - {1:MMMM yyyy} berechnen wir Ihnen folgende Verpflegungskosten:", start, end);
|
|
}
|
|
|
|
var tage = pRO.ServiceInvoicePeriods[0].ServiceInvoiceItems[0].UnitCount;
|
|
tc_Tage.Text = tage == 1 ? string.Format("{0:0 Tag}", tage) : string.Format("{0:0 Tage}", tage);
|
|
tc_PreisProEinheit.Text = string.Format("{0:c}", pRO.ServiceInvoicePeriods[0].ServiceInvoiceItems[0].AmountPerUnit);
|
|
tc_Gesamtpreis.Text = string.Format("{0:c}", pRO.ServiceInvoicePeriods[0].ServiceInvoiceItems[0].GrossAmount);
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
} |