53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Report;
|
|
|
|
namespace BWKGbR
|
|
{
|
|
public partial class Leistungsdokumentation : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<FLSReportRO>
|
|
{
|
|
public Leistungsdokumentation()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(FLSReportRO pRO)
|
|
{
|
|
Dictionary<String, long> catCountDict = new Dictionary<string, long>();
|
|
|
|
foreach (var group in pRO.FLSReportGroups)
|
|
{
|
|
foreach (var sr in group.ServiceRecords)
|
|
{
|
|
FLSReportRO.CreateGoalList(sr);
|
|
|
|
String cat = sr.ServiceCategory;
|
|
|
|
if (!catCountDict.ContainsKey(cat))
|
|
{
|
|
catCountDict[cat] = 0;
|
|
}
|
|
catCountDict[cat]++;
|
|
}
|
|
}
|
|
|
|
if (catCountDict.Keys.Count == 1)
|
|
{
|
|
String cat = catCountDict.Keys.First();
|
|
|
|
if (cat.Contains("Assistenz") || cat.Contains("Assisstenz"))
|
|
{
|
|
lblHeader.Text = "Auswertung über geleistete Assistenzstunden";
|
|
}
|
|
}
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
|
|
}
|
|
}
|