96 lines
4.1 KiB
C#
96 lines
4.1 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 System.Linq;
|
|
using BeWo.Data.Utils;
|
|
using System.Collections.Generic;
|
|
using DevExpress.XtraCharts.Native;
|
|
namespace BeWo.Report.DefaultReports
|
|
{
|
|
[IDSpecificClass(Identifier = "FLSAuswertung")]
|
|
public partial class FLSAuswertung : XtraReport, IBeWoReport<FLSReportRO>
|
|
{
|
|
public FLSAuswertung()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(FLSReportRO pRO)
|
|
{
|
|
List<string> aktenzeichen = new List<string>();
|
|
List<string> kostenträgerkontakte = new List<string>();
|
|
|
|
if (pRO.GroupTypeHeader == "Mitarbeiter/in")
|
|
{
|
|
foreach (var group in pRO.FLSReportGroups)
|
|
{
|
|
foreach (var detail in group.FLSReportDetails)
|
|
{
|
|
if (detail.ServiceRecords != null)
|
|
{
|
|
var c2scOid = detail.ServiceRecords.FirstOrDefault(sr => sr.CostBearer2SupportConceptOid.HasValue).CostBearer2SupportConceptOid;
|
|
if (c2scOid.HasValue)
|
|
{
|
|
var c2s = DAOFactory.GenericDAO.GetByID<CostBearer2SupportConcept>(c2scOid.Value);
|
|
var c2cList = c2s.SupportConcept.Customer.Customer2CostBearerList;
|
|
|
|
foreach (var item in c2cList)
|
|
{
|
|
if (item.ReferenceNumber != null && !aktenzeichen.Contains(item.ReferenceNumber))
|
|
aktenzeichen.Add(item.ReferenceNumber);
|
|
if (item.Notice != null && !kostenträgerkontakte.Contains(item.Notice))
|
|
kostenträgerkontakte.Add(item.Notice);
|
|
}
|
|
}
|
|
}
|
|
if (aktenzeichen.Count > 0)
|
|
group.CustomValue1 = "AZ: " + string.Join(", ", aktenzeichen);
|
|
if (kostenträgerkontakte.Count > 0)
|
|
group.CustomValue1 += "\nKontakt: " + string.Join(", ", kostenträgerkontakte);
|
|
}
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
foreach (var group in pRO.FLSReportGroups)
|
|
{
|
|
foreach (var detail in group.FLSReportDetails)
|
|
{
|
|
if (detail.ServiceRecords != null)
|
|
{
|
|
var c2scOid = detail.ServiceRecords.FirstOrDefault(sr => sr.CostBearer2SupportConceptOid.HasValue).CostBearer2SupportConceptOid;
|
|
if (c2scOid.HasValue)
|
|
{
|
|
var c2s = DAOFactory.GenericDAO.GetByID<CostBearer2SupportConcept>(c2scOid.Value);
|
|
var c2cList = c2s.SupportConcept.Customer.Customer2CostBearerList;
|
|
|
|
foreach (var item in c2cList)
|
|
{
|
|
if (item.ReferenceNumber != null && !aktenzeichen.Contains(item.ReferenceNumber))
|
|
aktenzeichen.Add(item.ReferenceNumber);
|
|
if (item.Notice != null && !kostenträgerkontakte.Contains(item.Notice))
|
|
kostenträgerkontakte.Add(item.Notice);
|
|
}
|
|
}
|
|
}
|
|
if (aktenzeichen.Count > 0)
|
|
detail.CustomValue1 = "AZ: " + string.Join(", ", aktenzeichen);
|
|
if (kostenträgerkontakte.Count > 0)
|
|
detail.CustomValue1 += "\nKontakt: " + string.Join(", ", kostenträgerkontakte);
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
|
|
}
|
|
}
|