57 lines
1.7 KiB
C#
57 lines
1.7 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using DevExpress.XtraReports.UI;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Report;
|
|
|
|
namespace BeWo.MuellestumpeReports
|
|
{
|
|
public partial class Stundenzettel : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
|
|
{
|
|
public Stundenzettel()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(ServicesOverviewRO pRO)
|
|
{
|
|
if (String.IsNullOrEmpty(pRO.ApprovedStartDate) && String.IsNullOrEmpty(pRO.ApprovedEndDate))
|
|
{
|
|
pRO.ApprovedStartDate = pRO.RequestedStartDate;
|
|
pRO.ApprovedEndDate = pRO.RequestedEndDate;
|
|
}
|
|
|
|
if (pRO.Services != null)
|
|
{
|
|
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
|
|
|
|
foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
|
|
{
|
|
if (s.IsBillable)
|
|
servicesBillable.Add(s);
|
|
}
|
|
|
|
pRO.Services = servicesBillable;
|
|
}
|
|
|
|
if (String.IsNullOrEmpty(pRO.AbsenceTimes))
|
|
{
|
|
lblHatAbwesenheiten.Text = "X";
|
|
lblAbsencetimes.Visible = false;
|
|
}
|
|
else
|
|
{
|
|
pRO.AbsenceTimes = "Krankenhausaufenthalte/stat. Rehamaßnahmen:\n" + pRO.AbsenceTimes;
|
|
lblHatAbwesenheiten.Visible = false;
|
|
lblKeineAbwesenheiten.Visible = false;
|
|
}
|
|
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
|
|
}
|
|
}
|