diff --git a/ReportImp/MalteserJohanniterJohanneshaus/Import/CustomDataImporter.cs b/ReportImp/MalteserJohanniterJohanneshaus/Import/CustomDataImporter.cs new file mode 100644 index 000000000..a3398f7ad --- /dev/null +++ b/ReportImp/MalteserJohanniterJohanneshaus/Import/CustomDataImporter.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Service.Core; +using BeWo.Service.Import.AvisImport; +using BeWo.Service.Plugins; +using BS.Shared.Core; +using BS.Shared.DataContracts; +using Utils = BS.Shared.Core.Utils; + +namespace MalteserJohanniterJohanneshaus.Import +{ + public class CustomLvrAviseImporter : LvrAviseImporter + { + public override List CreateHilfeplanInfos() + { + List liste = new List(); + var scList = DAOFactory.GenericDAO.GetAllActiveAndArchived(); + + foreach (var supportConcept in scList) + { + foreach (var cb2sc in supportConcept.CostBearer2SupportConceptList) + { + if (cb2sc.Notice == "60") + { + HilfeplanInfo hi = new HilfeplanInfo(); + hi.Start = cb2sc.StartDate; + hi.Ende = cb2sc.EndDate; + hi.Aktenzeichen = cb2sc.CustomerReferenceNumber; + hi.CostBearer2SupportConcept = cb2sc; + hi.CustomerFirstName = cb2sc.SupportConcept.Customer.Person.FirstName; + hi.CustomerLastName = cb2sc.SupportConcept.Customer.Person.LastName; + + if (hi.Start.HasValue && hi.Ende.HasValue && !String.IsNullOrEmpty(hi.Aktenzeichen)) + { + liste.Add(hi); + } + } + } + } + + return liste; + } + } +} diff --git a/ReportImp/MalteserJohanniterJohanneshaus/MalteserJohanniterJohanneshaus.csproj b/ReportImp/MalteserJohanniterJohanneshaus/MalteserJohanniterJohanneshaus.csproj index 903d997e4..56934256d 100644 --- a/ReportImp/MalteserJohanniterJohanneshaus/MalteserJohanniterJohanneshaus.csproj +++ b/ReportImp/MalteserJohanniterJohanneshaus/MalteserJohanniterJohanneshaus.csproj @@ -91,6 +91,7 @@ Finanzauswertung.cs + Component