From 6aaed7dcc23b91f76dc7354034cdba4edbed9ead Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Thu, 31 Oct 2024 09:20:01 +0100 Subject: [PATCH] temp --- BeWo/LoginControl.xaml.cs | 2 +- DakotaSender/App.config | 1 + DakotaSender/Program.cs | 34 ++++++++++++++++++++++---------- Host/GkvAbrechnungClient.aspx.cs | 3 +++ 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/BeWo/LoginControl.xaml.cs b/BeWo/LoginControl.xaml.cs index 1a3069b74..51576c656 100644 --- a/BeWo/LoginControl.xaml.cs +++ b/BeWo/LoginControl.xaml.cs @@ -957,7 +957,7 @@ namespace BeWo { return s.IsUserValid(tempUsername, lPassword, lPin); } - catch (Exception) + catch (Exception e) { return UserValidationResult.UnkownError; } diff --git a/DakotaSender/App.config b/DakotaSender/App.config index ed14047d0..e1c540102 100644 --- a/DakotaSender/App.config +++ b/DakotaSender/App.config @@ -11,5 +11,6 @@ + \ No newline at end of file diff --git a/DakotaSender/Program.cs b/DakotaSender/Program.cs index 609893b98..2d7952ae3 100644 --- a/DakotaSender/Program.cs +++ b/DakotaSender/Program.cs @@ -41,12 +41,7 @@ namespace DakotaSender HandleQueueFiles(); - var task = HandleResultsAsync(); - - task.Wait(); - - if (task.IsFaulted) - throw task.Exception; + HandleResults(); } catch (Exception e) { @@ -65,14 +60,15 @@ namespace DakotaSender internal static void PrintTitle() { PrintWithTime("\n", false); - PrintLine("-------------------"); + PrintSeperator(); PrintLine("Dakota Sender Modul"); - PrintLine("-------------------"); + PrintSeperator(); } + internal static void PrintSeperator() => PrintLine("-------------------"); internal static void PrintEnd() { PrintLine("Ende"); - PrintLine("-------------------"); + PrintSeperator(); } internal static void PrintLine() => PrintLine(null); internal static void PrintLine(string line) @@ -119,6 +115,8 @@ namespace DakotaSender { throw new Exception($"Statuscode {code} wird nicht akzeptiert. {message}"); } + + PrintSeperator(); } static Dictionary>> ScanQueueFolder() { @@ -200,7 +198,7 @@ namespace DakotaSender ten2user2req = new Dictionary>(); - PrintLine(); + PrintSeperator(); foreach (var kv in ten2dat2files) { var ten = kv.Key; @@ -214,6 +212,10 @@ namespace DakotaSender PrintLine($"Bearbeite Datenannahmestelle {dat} für Tenant {ten}."); HandleQueueFiles(files); + + PrintSeperator(); + + CheckDakotaStatus(); } } } @@ -315,6 +317,18 @@ namespace DakotaSender req.ResultDCs.Add(item); } + static void HandleResults() + { + if (ten2user2req is null) + return; + + var task = HandleResultsAsync(); + + task.Wait(); + + if (task.IsFaulted) + throw task.Exception; + } static async Task HandleResultsAsync() { var tasks = new List(); diff --git a/Host/GkvAbrechnungClient.aspx.cs b/Host/GkvAbrechnungClient.aspx.cs index 9667ba807..6dcb4b6ce 100644 --- a/Host/GkvAbrechnungClient.aspx.cs +++ b/Host/GkvAbrechnungClient.aspx.cs @@ -60,6 +60,9 @@ namespace Host private void ClientResult(GkvClientResultRequestDC req) { + if (GkvSecretKey is null) + SendErrorResponse(INVALID_INPUT + " 1"); + if (GkvSecretKey != req.GkvSecretKey) SendErrorResponse(INVALID_INPUT + " 2");