From 2f8dcc87f0b5dc1c634fdb25f9851e6da3401c54 Mon Sep 17 00:00:00 2001 From: Lyndon Jetten Date: Tue, 11 Oct 2022 16:48:36 +0200 Subject: [PATCH] =?UTF-8?q?BeWoDatabaseTerminator=20hinzugef=C3=BCgt=20Kal?= =?UTF-8?q?ender-Report=20f=C3=BCr=20Kollegium=20e.V.=20angefangen.=20Noch?= =?UTF-8?q?=20nicht=20fertig!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + BeWo/Core/BeWoUtils.cs | 16 +- BeWo/MainControl.xaml.cs | 13 +- BeWo/Scheduler/Utils/AppointmentExtensions.cs | 11 +- BeWo/Scheduler/View/NewSchedulerView.xaml | 12 +- BeWo/Scheduler/View/NewSchedulerView.xaml.cs | 99 +- .../View/SchedulerAppointmentEditForm.xaml.cs | 26 +- .../Scheduler/ViewModel/CustomFieldStorage.cs | 4 + .../ViewModel/NewSchedulerViewModel.cs | 6 +- .../ViewModel/SchedulerAppointmentVM.cs | 60 +- BeWo/ServiceProxy/Generated.cs | 26 +- BeWo/View/Master/AdministrationView.xaml | 2 +- .../BeWoDatabaseTerminator.sln | 25 + .../BeWoDatabaseTerminator/App.config | 19 + .../BeWoDatabaseTerminator.csproj | 76 + .../Data/ContractStatus.cs | 11 + .../Data/ContractStatusCollection.cs | 14 + .../ContractStatusCollectionJsonConverter.cs | 79 + .../Data/InitialPasswordResponse.cs | 10 + .../InitialPasswordResponseJsonConverter.cs | 42 + .../MySql/MySqlHelper.cs | 276 + .../BeWoDatabaseTerminator/Program.cs | 530 + .../Properties/AssemblyInfo.cs | 36 + .../BeWoDatabaseTerminator/Security/BCrypt.cs | 800 ++ .../Security/PasswordHelper.cs | 81 + .../BeWoDatabaseTerminator/Utils/FileUtils.cs | 104 + .../BeWoDatabaseTerminator/Utils/LogUtils.cs | 29 + .../BeWoDatabaseTerminator/bdt.ico | Bin 0 -> 2238 bytes .../BeWoDatabaseTerminator/packages.config | 4 + .../Newtonsoft.Json.13.0.1/.signature.p7s | Bin 0 -> 18122 bytes .../Newtonsoft.Json.13.0.1/LICENSE.md | 20 + .../Newtonsoft.Json.13.0.1.nupkg | Bin 0 -> 2065787 bytes .../lib/net20/Newtonsoft.Json.dll | Bin 0 -> 571944 bytes .../lib/net20/Newtonsoft.Json.xml | 10335 ++++++++++++++ .../lib/net35/Newtonsoft.Json.dll | Bin 0 -> 506920 bytes .../lib/net35/Newtonsoft.Json.xml | 9483 +++++++++++++ .../lib/net40/Newtonsoft.Json.dll | Bin 0 -> 576040 bytes .../lib/net40/Newtonsoft.Json.xml | 9683 +++++++++++++ .../lib/net45/Newtonsoft.Json.dll | Bin 0 -> 701992 bytes .../lib/net45/Newtonsoft.Json.xml | 11305 ++++++++++++++++ .../lib/netstandard1.0/Newtonsoft.Json.dll | Bin 0 -> 670760 bytes .../lib/netstandard1.0/Newtonsoft.Json.xml | 10993 +++++++++++++++ .../lib/netstandard1.3/Newtonsoft.Json.dll | Bin 0 -> 689704 bytes .../lib/netstandard1.3/Newtonsoft.Json.xml | 11115 +++++++++++++++ .../lib/netstandard2.0/Newtonsoft.Json.dll | Bin 0 -> 695336 bytes .../lib/netstandard2.0/Newtonsoft.Json.xml | 11280 +++++++++++++++ .../Newtonsoft.Json.13.0.1/packageIcon.png | Bin 0 -> 8956 bytes BeWoDatabaseTerminator/readme.md | 9 + BeWoPlanerMobil/Controllers/MainController.cs | 2 + BeWoPlanerMobil/Models/AbstractModel.cs | 2 + .../Views/Main/SingleBookingPartial.cshtml | 26 +- Data/Access/SearchDAO.cs | 20 +- Data/Entities/SchedulerAppointment.cs | 24 +- .../DailyAppointmentReportKalender.cs | 52 +- Report/ReportObjects/KalenderRO.cs | 171 +- Report/ReportObjects/ServicesOverviewRO.cs | 33 +- ReportImp/AsbRuhr/CustomReportCreator.cs | 36 +- .../QuittierungsbelegAssistenz.Designer.cs | 64 +- .../QuittierungsbelegMitDatum.Designer.cs | 108 +- .../AsbRuhr/QuittierungsbelegMitDatum.cs | 37 +- ...DailyAppointmentReportKalender.Designer.cs | 303 + .../DailyAppointmentReportKalender.cs | 87 + .../DailyAppointmentReportKalender.resx | 123 + ReportImp/KollegiumEv/KollegiumEv.csproj | 14 + .../ServiceContracts/IReportService.cs | 4 + .../ReportServiceImp.cs | 19 +- Service/Plugins/PluginLoader.cs | 5 +- .../ResourceServiceImp.cs | 179 +- Shared/BeWoEntityEnums.cs | 1 + Shared/Core/DebugUtils.cs | 84 + Shared/Core/ImageUtils.cs | 36 + Shared/Core/SettingsKeys.cs | 12 +- Shared/Core/Utils.cs | 114 +- Shared/Shared.csproj | 2 + 74 files changed, 77834 insertions(+), 359 deletions(-) create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator.sln create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/App.config create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/BeWoDatabaseTerminator.csproj create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/Data/ContractStatus.cs create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/Data/ContractStatusCollection.cs create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/Data/ContractStatusCollectionJsonConverter.cs create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/Data/InitialPasswordResponse.cs create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/Data/InitialPasswordResponseJsonConverter.cs create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/MySql/MySqlHelper.cs create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/Program.cs create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/Properties/AssemblyInfo.cs create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/Security/BCrypt.cs create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/Security/PasswordHelper.cs create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/Utils/FileUtils.cs create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/Utils/LogUtils.cs create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/bdt.ico create mode 100644 BeWoDatabaseTerminator/BeWoDatabaseTerminator/packages.config create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/.signature.p7s create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/LICENSE.md create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/Newtonsoft.Json.13.0.1.nupkg create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/net20/Newtonsoft.Json.dll create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/net20/Newtonsoft.Json.xml create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/net35/Newtonsoft.Json.dll create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/net35/Newtonsoft.Json.xml create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/net40/Newtonsoft.Json.dll create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/net40/Newtonsoft.Json.xml create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/net45/Newtonsoft.Json.dll create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/net45/Newtonsoft.Json.xml create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/netstandard1.0/Newtonsoft.Json.dll create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/netstandard1.0/Newtonsoft.Json.xml create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/netstandard1.3/Newtonsoft.Json.dll create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/netstandard1.3/Newtonsoft.Json.xml create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/netstandard2.0/Newtonsoft.Json.dll create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/lib/netstandard2.0/Newtonsoft.Json.xml create mode 100644 BeWoDatabaseTerminator/packages/Newtonsoft.Json.13.0.1/packageIcon.png create mode 100644 BeWoDatabaseTerminator/readme.md create mode 100644 ReportImp/KollegiumEv/DailyAppointmentReportKalender.Designer.cs create mode 100644 ReportImp/KollegiumEv/DailyAppointmentReportKalender.cs create mode 100644 ReportImp/KollegiumEv/DailyAppointmentReportKalender.resx create mode 100644 Shared/Core/DebugUtils.cs create mode 100644 Shared/Core/ImageUtils.cs diff --git a/.gitignore b/.gitignore index 6e3981536..46ca0b553 100644 --- a/.gitignore +++ b/.gitignore @@ -572,3 +572,4 @@ obj /ReportImp/DiakonieKKKleve/Mitarbeiterarbeitszeitkonto.resx /ReportImp/DiakonieKKKleve/Mitarbeiterarbeitszeitkonto.cs /ReportImp/DiakonieKKKleve/CustomMitarbeiterstundenkontoBerechnungTagesansicht.cs +/BeWoDatabaseTerminator/.vs diff --git a/BeWo/Core/BeWoUtils.cs b/BeWo/Core/BeWoUtils.cs index 7c82910c2..564f24df9 100644 --- a/BeWo/Core/BeWoUtils.cs +++ b/BeWo/Core/BeWoUtils.cs @@ -1920,8 +1920,18 @@ namespace BeWo.Core var employeeOid = Convert.ToInt64(variablen["employeeOid"]); var serienTermine = (List)variablen["serienTermine"]; var mehrtaegigeTermine = (List)variablen["mehrtaegigeTermine"]; + var nullableAbsenceTimeOids = (List) variablen["absenceTimeOids"] ?? new List(); - ServiceFacade.DoReportServiceAsync(strom => strom.CreateKalenderReport(appointmentIds, employeeOid, serienTermine, selectedDays, mehrtaegigeTermine), ms => BeWoApp.MainControl.Dispatch(() => ShowReportWindow(ms, title))); + var absenceTimeOids = new List(); + foreach(var absenceTimeOid in nullableAbsenceTimeOids) + { + if(absenceTimeOid.HasValue) + { + absenceTimeOids.AddIfNotIn(absenceTimeOid.Value); + } + } + + ServiceFacade.DoReportServiceAsync(strom => strom.CreateKalenderReportWithAbsenceTimes(appointmentIds, employeeOid, serienTermine, selectedDays, mehrtaegigeTermine, absenceTimeOids), ms => BeWoApp.MainControl.Dispatch(() => ShowReportWindow(ms, title))); break; case ReportEnum.KassenbuchReportEnum: @@ -2168,11 +2178,11 @@ namespace BeWo.Core return BeWoApp.LoggedOnUser.HasRight(pUserRightType); } - public static bool CheckSchedulerRights(Appointment pAppointment, bool pIsNew, SchedulerRightsCheckType pCheckType) + public static bool CheckSchedulerRights(Appointment pAppointment, bool pIsNew, SchedulerRightsCheckType pCheckType, List teamMemberCustomerOids, bool ignoreViewEditCreateAllRights) { var storage = pAppointment.GetCustomFieldStorage(); - return Utils.CheckSchedulerRights(storage.CustomerList, storage.ResourceList, storage.EmployeeList.ToList(), storage.Originator, pIsNew, pCheckType, BeWoApp.LoggedOnUser); + return Utils.CheckSchedulerRights(storage.CustomerList, storage.ResourceList, storage.EmployeeList.ToList(), storage.Originator, pIsNew, pCheckType, BeWoApp.LoggedOnUser, teamMemberCustomerOids, ignoreViewEditCreateAllRights); } public static void EditServiceRecord(ServiceRecordDC dc, DispatcherObject p) diff --git a/BeWo/MainControl.xaml.cs b/BeWo/MainControl.xaml.cs index 78d069914..6d4ecf435 100644 --- a/BeWo/MainControl.xaml.cs +++ b/BeWo/MainControl.xaml.cs @@ -30,9 +30,6 @@ using BS.Shared; using BS.Shared.DataContracts; using BS.Shared.Extensions; using BS.Shared.Translation; -using DevExpress.Xpf.Editors; -using DevExpress.Xpf.Grid; -using DevExpress.Xpf.Scheduler; using Hyperlink = System.Windows.Documents.Hyperlink; namespace BeWo @@ -53,7 +50,7 @@ namespace BeWo Wohnheim, Vertretungen, CustomerTeam - } + } public partial class MainControl { @@ -118,7 +115,11 @@ namespace BeWo } this.button_Dokumente.Visibility = Visibility.Collapsed; #endif - } + + #if DEBUG + //DebugHelperViewButton.Visibility = Visibility.Visible; +#endif + } public List OpenedModalViewWindows { get; set; } @@ -1729,7 +1730,5 @@ namespace BeWo NavigateTo(GetViewForUIContext(UIContext.Vertretungen)); } } - - } } \ No newline at end of file diff --git a/BeWo/Scheduler/Utils/AppointmentExtensions.cs b/BeWo/Scheduler/Utils/AppointmentExtensions.cs index 81baae06e..7ebf3ec34 100644 --- a/BeWo/Scheduler/Utils/AppointmentExtensions.cs +++ b/BeWo/Scheduler/Utils/AppointmentExtensions.cs @@ -101,6 +101,11 @@ namespace BeWo.Scheduler.Utils } + public static long? CF_AbsenceTimeOid(this Appointment appointment) + { + return appointment.GetCustomFieldStorage()?.AbsenceTimeOid; + } + public static void CF_IsTask(this Appointment appointment, bool pIsTask) { @@ -122,7 +127,11 @@ namespace BeWo.Scheduler.Utils appointment.GetCustomFieldStorage().IsAllDay = pIsAllDay; } - + public static void CF_AbsenceTimeOid(this Appointment appointment, long? absenceTimeOid) + { + appointment.GetCustomFieldStorage().AbsenceTimeOid = absenceTimeOid; + } + public static void CF_EmployeeList(this Appointment appointment, ObservableCollection pEmployeeList) diff --git a/BeWo/Scheduler/View/NewSchedulerView.xaml b/BeWo/Scheduler/View/NewSchedulerView.xaml index e122060c8..bc2de893e 100644 --- a/BeWo/Scheduler/View/NewSchedulerView.xaml +++ b/BeWo/Scheduler/View/NewSchedulerView.xaml @@ -635,6 +635,7 @@ + @@ -644,8 +645,9 @@ - - + + + @@ -653,7 +655,7 @@ - +