From d158b2fad6458492b8a0cbb45bddd4388d42fbeb Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 14 Jul 2023 00:32:16 +0200 Subject: [PATCH] Drucken Vertretungen in GUI(Report fehlt noch) --- BeWo/BeWoApp.xaml.cs | 54 +- .../VertretungsMainViewV2.xaml | 1774 +++++++++-------- .../VertretungsMainViewV2.xaml.cs | 29 +- BeWo/View/Master/ReportView.xaml.cs | 9 +- BeWo/app.config | 6 +- Data/Mappings/ApplicationUser.hbm.xml | 2 +- Host/ReportView.aspx.cs | 14 + Report/AbstractReportCreator.cs | 6 +- Report/DefaultReportCreator.cs | 12 + ReportImp/SHKServiceSBD/Arbeitszeitkonto.cs | 30 + .../Arbeitszeitkonto.designer.cs | 1154 +++++++++++ ReportImp/SHKServiceSBD/Arbeitszeitkonto.resx | 129 ++ .../SHKServiceSBD/ArbeitszeitkontoListRO.cs | 45 + ReportImp/SHKServiceSBD/SHKServiceSBD.csproj | 11 + .../Service/CustomVertretungsManager.cs | 43 +- Service/Plugins/PluginLoader.cs | 8 +- Service/SBD/VertretungsManager.cs | 16 +- Shared/DataContracts/ReportTypes.cs | 4 +- 18 files changed, 2416 insertions(+), 930 deletions(-) create mode 100644 ReportImp/SHKServiceSBD/Arbeitszeitkonto.cs create mode 100644 ReportImp/SHKServiceSBD/Arbeitszeitkonto.designer.cs create mode 100644 ReportImp/SHKServiceSBD/Arbeitszeitkonto.resx create mode 100644 ReportImp/SHKServiceSBD/ArbeitszeitkontoListRO.cs diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index a6f19ae5a..8461b3c4a 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -668,19 +668,31 @@ namespace BeWo { string localAppData = Environment.GetFolderPath( Environment.SpecialFolder.LocalApplicationData); - string companyFilePath + + string companyFilePathBS = Path.Combine(localAppData, "beyondSoft"); + string bewoFilePathBS + = Path.Combine(companyFilePathBS, "BeWoPlaner"); - if (!Directory.Exists(companyFilePath)) - Directory.CreateDirectory(companyFilePath); + string companyFilePathOS + = Path.Combine(localAppData, "ownSoft"); - string bewoFilePath - = Path.Combine(companyFilePath, "BeWoPlaner"); + if (!Directory.Exists(companyFilePathOS)) + Directory.CreateDirectory(companyFilePathOS); - if (!Directory.Exists(bewoFilePath)) - Directory.CreateDirectory(bewoFilePath); - return bewoFilePath; + string bewoFilePathOS + = Path.Combine(companyFilePathOS, "BeWoPlaner"); + + if (!Directory.Exists(bewoFilePathOS)) + Directory.CreateDirectory(bewoFilePathOS); + + //return bewoFilePathBS; // raus + + CheckOldBSPathAndCopyFiles(bewoFilePathBS, bewoFilePathOS); + + + return bewoFilePathOS; } catch (Exception ex) { @@ -691,6 +703,32 @@ namespace BeWo return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); } + private static void CheckOldBSPathAndCopyFiles(string companyFilePathBS, string companyFilePathOS) + { + if (Directory.Exists(companyFilePathBS)) + { + var bsFiles = Directory.GetFiles(companyFilePathBS); + + if (bsFiles.Length > 0) + { + var osFiles = Directory.GetFiles(companyFilePathOS); + if (osFiles.Length == 0) + { + foreach (var file in bsFiles) + { + File.Move(file, Path.Combine(companyFilePathOS, Path.GetFileName(file))); + } + + Directory.Delete(companyFilePathBS); + } + + } + + //var p = Directory.GetParent(companyFilePathBS); + //Directory.Delete(Directory.GetParent(companyFilePathBS).FullName); + } + } + internal static bool HasLoggedOnUserRight(UserRightType[] pRight) { if (LoggedOnUser != null) diff --git a/BeWo/SchulbegleitenderDienst/VertretungsMainViewV2.xaml b/BeWo/SchulbegleitenderDienst/VertretungsMainViewV2.xaml index eb6642e0f..2fb0aac03 100644 --- a/BeWo/SchulbegleitenderDienst/VertretungsMainViewV2.xaml +++ b/BeWo/SchulbegleitenderDienst/VertretungsMainViewV2.xaml @@ -15,227 +15,235 @@ xmlns:schulbegleitenderDienst="clr-namespace:BeWo.SchulbegleitenderDienst" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True" x:Name="View"> - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + - + + + + + + + + - + - - - - - - - - + + + + + + + + @@ -246,109 +254,109 @@ - - - - - - - - + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + - - - - - - + + + + + + @@ -476,708 +484,708 @@ - + - + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - -