Files

52 lines
1.5 KiB
C#

using System;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using DevExpress.XtraReports.UI;
using BS.Shared.Core;
using BS.Shared.Extensions;
namespace VereinSozialmedizinStade
{
[IDSpecificClass(Identifier = "FLSAuswertung")]
public partial class FLSAuswertung : XtraReport, IBeWoReport<FLSReportRO>
{
public FLSAuswertung()
{
InitializeComponent();
}
public void SetReportDataSource(FLSReportRO pRO)
{
foreach (var group in pRO.FLSReportGroups)
{
foreach (var detail in group.FLSReportDetails)
{
foreach (var sr in detail.ServiceRecords)
{
if (!sr.Notice.IsNullOrEmpty())
sr.Notice += "\n";
if (!sr.Notice4.IsNullOrEmpty())
{
sr.Notice += "Beteiligte Mitarbeiter*innen:" + sr.Notice4.Remove(sr.Notice4.Length - 2, 1);
sr.Notice += "\n";
}
if (!sr.Notice5.IsNullOrEmpty())
{
sr.Notice += "Beteiligte Klient*innen:" + sr.Notice5.Remove(sr.Notice5.Length - 2, 1);
sr.Notice += "\n";
}
}
}
}
this.bindingSource1.DataSource = pRO;
}
}
}