From c22e9d8eddb3de5432714590606a9e802bc8e204 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Thu, 16 Nov 2023 15:51:50 +0100 Subject: [PATCH] <12 PAS setzt PAX fix auf false --- ENI2/ENI2.csproj | 2 +- ENI2/Excel/DakosyUtil.cs | 17 +++++++---------- ENI2/Excel/ExcelUtil.cs | 19 ++++++++----------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj index cbaf28c7..7e80bd39 100644 --- a/ENI2/ENI2.csproj +++ b/ENI2/ENI2.csproj @@ -36,7 +36,7 @@ 5.4.0.0 true publish.html - 3 + 4 7.2.0.%2a false true diff --git a/ENI2/Excel/DakosyUtil.cs b/ENI2/Excel/DakosyUtil.cs index cf0b01e8..3552a131 100644 --- a/ENI2/Excel/DakosyUtil.cs +++ b/ENI2/Excel/DakosyUtil.cs @@ -764,11 +764,9 @@ namespace ENI2.Excel result = true; } - if(pasdMessage.Elements.Count >= 12) - { - foreach (PASD pasd in pasdMessage.Elements.Cast()) - pasd.NotificationPAX = true; - } + bool mustPAX = pasdMessage.Elements.Count >= 12; + foreach (PASD pasd in pasdMessage.Elements.Cast()) + pasd.NotificationPAX = mustPAX; return result; } @@ -823,11 +821,10 @@ namespace ENI2.Excel result = true; } - if (pasMessage.Elements.Count >= 12) - { - foreach (PAS pasa in pasMessage.Elements.Cast()) - pasa.NotificationPAX = true; - } + bool mustPAX = pasMessage.Elements.Count >= 12; + foreach (PAS pasa in pasMessage.Elements.Cast()) + pasa.NotificationPAX = mustPAX; + return result; } diff --git a/ENI2/Excel/ExcelUtil.cs b/ENI2/Excel/ExcelUtil.cs index e6c2df49..e0667d86 100644 --- a/ENI2/Excel/ExcelUtil.cs +++ b/ENI2/Excel/ExcelUtil.cs @@ -2370,11 +2370,10 @@ namespace ENI2.Excel Util.UIHelper.SetBusyState(); // dialog might reset busy state } - if(newPasList.Count >= 12) - { - foreach (PAS pas in newPasList) - pas.NotificationPAX = true; - } + bool mustPAX = newPasList.Count >= 12; + foreach (PAS pasa in newPasList.Cast()) + pasa.NotificationPAX = mustPAX; + } else { @@ -2507,12 +2506,10 @@ namespace ENI2.Excel Util.UIHelper.SetBusyState(); // dialog might reset busy state } - if (newPasList.Count >= 12) - { - foreach (PASD pasd in newPasList.Cast()) - pasd.NotificationPAX = true; - } - + bool mustPAX = newPasList.Count >= 12; + foreach (PASD pasd in newPasList.Cast()) + pasd.NotificationPAX = mustPAX; + } DBManager.Instance.DeleteAllPASForMessage(pasMessage.Id);