From d1de68e9c8b64d3f108fd4064775199d85ba9ab8 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Fri, 21 Oct 2022 12:27:00 +0200 Subject: [PATCH] weitere Kleinstkorrekturen --- ENI2/Excel/ExcelUtil.cs | 10 +++++++++- bsmd.database/CREW.cs | 7 +++++++ bsmd.database/PAS.cs | 7 +++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ENI2/Excel/ExcelUtil.cs b/ENI2/Excel/ExcelUtil.cs index 3dfc136e..22f06626 100644 --- a/ENI2/Excel/ExcelUtil.cs +++ b/ENI2/Excel/ExcelUtil.cs @@ -2111,6 +2111,8 @@ namespace ENI2.Excel crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31); crew.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142)); + + Util.UIHelper.SetBusyState(); // dialog might reset busy state } return true; @@ -2236,7 +2238,9 @@ namespace ENI2.Excel pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 17)); pas.EmergencyCare = reader.ReadCellAsText(sheetTitle, string.Format("R{0}", i + 17)); pas.EmergencyContactNumber = reader.ReadCellAsText(sheetTitle, string.Format("S{0}", i + 17)); - + + Util.UIHelper.SetBusyState(); // dialog might reset busy state + } DBManager.Instance.DeleteAllPASForMessage(pasMessage.Id); @@ -2477,6 +2481,10 @@ namespace ENI2.Excel canceled = true; } } + } + else + { + result = 0; // not known } return result; diff --git a/bsmd.database/CREW.cs b/bsmd.database/CREW.cs index 93791588..e937251f 100644 --- a/bsmd.database/CREW.cs +++ b/bsmd.database/CREW.cs @@ -299,6 +299,13 @@ namespace bsmd.database if (this.CrewMemberIdentityDocumentExpiryDate.Equals(new DateTime(2100, 12, 31))) violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Id doc expiry date set to 31/12/2100", null, this.Title, this.Identifier, this.Tablename)); } + + if (this.CrewMemberGender.HasValue) + { + if (this.CrewMemberGender == 0) + violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Gender set to unknown", null, this.Title, this.Identifier, this.Tablename)); + } + } #endregion diff --git a/bsmd.database/PAS.cs b/bsmd.database/PAS.cs index f145c1b3..7dcd7a6b 100644 --- a/bsmd.database/PAS.cs +++ b/bsmd.database/PAS.cs @@ -356,6 +356,13 @@ namespace bsmd.database if(this.PassengerIdentityDocumentExpiryDate.Equals(new DateTime(2100, 12, 31))) violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Id doc expiry date set to 31/12/2100", null, this.Title, this.Identifier, this.Tablename)); } + + if(this.PassengerGender.HasValue) + { + if(this.PassengerGender == 0) + violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Gender set to unknown", null, this.Title, this.Identifier, this.Tablename)); + } + } #endregion