32 lines
1021 B
C#
32 lines
1021 B
C#
using System;
|
|
using BS.Shared;
|
|
using BeWo.Report.ReportObjects;
|
|
|
|
namespace MalteserJohanniterJohanneshaus
|
|
{
|
|
public partial class AnwesenheitenTsh : DevExpress.XtraReports.UI.XtraReport // , IBeWoReport<AdditionalServiceBookingRO>
|
|
{
|
|
public AnwesenheitenTsh()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(Invoicing.AnwesenheitenZeiterfassungRO pRO)
|
|
{
|
|
bindingSource1.DataSource = pRO;
|
|
Monat monat;
|
|
Enum.TryParse(pRO.Month, out monat);
|
|
var monatInt = pRO.MonthInt;
|
|
var daysInMonth = DateTime.DaysInMonth(pRO.Year, monatInt);
|
|
|
|
xrTableCell30.Visible = daysInMonth >= 29;
|
|
xrTableCell31.Visible = daysInMonth >= 30;
|
|
xrTableCell32.Visible = daysInMonth == 31;
|
|
|
|
xrTableCell62.Visible = xrTableCell30.Visible;
|
|
xrTableCell63.Visible = xrTableCell31.Visible;
|
|
xrTableCell64.Visible = xrTableCell32.Visible;
|
|
}
|
|
}
|
|
}
|