59 lines
1.4 KiB
C#
59 lines
1.4 KiB
C#
using System;
|
|
using BeWo.Report;
|
|
using BeWo.Report.ReportObjects;
|
|
using BS.Shared.Core;
|
|
|
|
|
|
namespace PraunheimerWerkstaetten2
|
|
{
|
|
[IDSpecificClass(Identifier = "Mitarbeiterauslastung")]
|
|
public partial class Mitarbeiterauslastung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<MitarbeiterauslastungRO>
|
|
{
|
|
|
|
|
|
public Mitarbeiterauslastung()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(MitarbeiterauslastungRO pRO)
|
|
{
|
|
AuslastungBerechnung b = new AuslastungBerechnung();
|
|
b.CreateReport(pRO);
|
|
|
|
foreach (var ed in pRO.EmployeeDetailList)
|
|
{
|
|
|
|
foreach (var sd in ed.SupportConceptDetailList)
|
|
{
|
|
sd.Custom1 = "";
|
|
|
|
var scap = sd.SupportConceptApprovalPeriod;
|
|
|
|
if (scap != null)
|
|
{
|
|
foreach (var s2e in scap.SupportConceptApprovalPeriod2Employee)
|
|
{
|
|
var name = s2e.Employee.Person.FirstNameLastName;
|
|
|
|
if (sd.Custom1.Length > 0)
|
|
{
|
|
sd.Custom1 += ", ";
|
|
}
|
|
|
|
sd.Custom1 += name;
|
|
}
|
|
}
|
|
|
|
if (String.IsNullOrWhiteSpace(sd.Custom1))
|
|
{
|
|
sd.Custom1 = ed.FullName;
|
|
}
|
|
}
|
|
}
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
|
|
}
|
|
}
|