2023-08-14 15:41:53 +02:00
|
|
|
|
using System;
|
2023-08-15 15:01:55 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using BeWo.Data.Access;
|
|
|
|
|
|
using BeWo.Data.Entities;
|
2023-08-14 15:41:53 +02:00
|
|
|
|
using BeWo.Report;
|
|
|
|
|
|
using BeWo.Report.ReportObjects;
|
2023-08-15 15:01:55 +02:00
|
|
|
|
using BeWo.Service.DCEntityMapper;
|
2023-08-14 15:41:53 +02:00
|
|
|
|
using BS.Shared.Core;
|
2023-08-15 15:01:55 +02:00
|
|
|
|
using BS.Shared.DataContracts;
|
2023-08-14 15:41:53 +02:00
|
|
|
|
using DevExpress.XtraReports.UI;
|
|
|
|
|
|
|
|
|
|
|
|
namespace AsbRheinErftDuerenSBD
|
|
|
|
|
|
{
|
|
|
|
|
|
[IDSpecificClass(Identifier = "POOL")]
|
|
|
|
|
|
public partial class PoolInvoiceReport : XtraReport, IBeWoReport<ServiceInvoiceRO>
|
|
|
|
|
|
{
|
|
|
|
|
|
public PoolInvoiceReport()
|
|
|
|
|
|
{
|
|
|
|
|
|
this.InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
|
|
|
|
|
{
|
2023-08-15 15:01:55 +02:00
|
|
|
|
string employeeNames = "";
|
2023-08-23 13:31:27 +02:00
|
|
|
|
foreach (var sip in pRO.ServiceInvoicePeriods)
|
|
|
|
|
|
{
|
|
|
|
|
|
employeeNames += sip.Notice;
|
|
|
|
|
|
if (pRO.ServiceInvoicePeriods.Last().Notice != sip.Notice)
|
|
|
|
|
|
employeeNames += ", ";
|
|
|
|
|
|
}
|
|
|
|
|
|
//var allTeams = MapperFactory.TeamDC_Team.MapToNewDCs(DAOFactory.GenericDAO.GetAllActive<Team>());
|
|
|
|
|
|
//List<EmployeeDC> employeeList = new List<EmployeeDC>();
|
2023-08-15 15:01:55 +02:00
|
|
|
|
|
|
|
|
|
|
if (pRO.CustomerName.ToLower().Contains("christophorus"))
|
|
|
|
|
|
{
|
|
|
|
|
|
lblSchulname.Text = "Christophorusschule, Poolbildung";
|
|
|
|
|
|
lblSchuladresse.Text = "Rudof-Diesel-Str. 19, 52351 D<>ren";
|
|
|
|
|
|
lblBereich.Text = "im Bereich Sozialamt Christophorusschule Poolbildung";
|
|
|
|
|
|
|
2023-08-23 13:31:27 +02:00
|
|
|
|
//var team = allTeams.FirstOrDefault(t => t.Name.ToLower().Contains("christophorus"));
|
|
|
|
|
|
//employeeList = MapperFactory.EmployeeDC_Employee.MapToNewDCs(DAOFactory.GenericDAO.GetActiveByIDs<Employee>(team.Member.Select(m => m.EmployeeOid).ToList()));
|
2023-08-15 15:01:55 +02:00
|
|
|
|
}
|
|
|
|
|
|
else if (pRO.CustomerName.ToLower().Contains("stephanus"))
|
|
|
|
|
|
{
|
|
|
|
|
|
lblSchulname.Text = "Stephanus-Schule, Poolbildung";
|
|
|
|
|
|
lblSchuladresse.Text = "Stephanusweg 2, 52428 J<>lich - Selgersdorf";
|
|
|
|
|
|
lblBereich.Text = "im Bereich Sozialamt Stephanus-Schule Poolbildung";
|
|
|
|
|
|
|
2023-08-23 13:31:27 +02:00
|
|
|
|
//var team = allTeams.FirstOrDefault(t => t.Name.ToLower().Contains("stephanus"));
|
|
|
|
|
|
//employeeList = MapperFactory.EmployeeDC_Employee.MapToNewDCs(DAOFactory.GenericDAO.GetActiveByIDs<Employee>(team.Member.Select(m => m.EmployeeOid).ToList()));
|
2023-08-15 15:01:55 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-23 13:31:27 +02:00
|
|
|
|
//foreach (var e in employeeList)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// employeeNames += e.FirstName + " " + e.LastName;
|
|
|
|
|
|
// if (employeeList.Last() != e)
|
|
|
|
|
|
// employeeNames += ", ";
|
|
|
|
|
|
//}
|
2023-08-15 15:01:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lblTeammitglieder.Text = employeeNames;
|
2023-08-14 15:41:53 +02:00
|
|
|
|
|
|
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|