weitere Kleinstkorrekturen

This commit is contained in:
Daniel Schick 2022-10-21 12:27:00 +02:00
parent f593d66333
commit d1de68e9c8
3 changed files with 23 additions and 1 deletions

View File

@ -2111,6 +2111,8 @@ namespace ENI2.Excel
crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31); crew.CrewMemberIdentityDocumentExpiryDate = new DateTime(2100, 12, 31);
crew.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142)); crew.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142));
Util.UIHelper.SetBusyState(); // dialog might reset busy state
} }
return true; return true;
@ -2236,7 +2238,9 @@ namespace ENI2.Excel
pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 17)); pas.PassengerVisaNumber = reader.ReadCellAsText(sheetTitle, string.Format("Q{0}", i + 17));
pas.EmergencyCare = reader.ReadCellAsText(sheetTitle, string.Format("R{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)); pas.EmergencyContactNumber = reader.ReadCellAsText(sheetTitle, string.Format("S{0}", i + 17));
Util.UIHelper.SetBusyState(); // dialog might reset busy state
} }
DBManager.Instance.DeleteAllPASForMessage(pasMessage.Id); DBManager.Instance.DeleteAllPASForMessage(pasMessage.Id);
@ -2477,6 +2481,10 @@ namespace ENI2.Excel
canceled = true; canceled = true;
} }
} }
}
else
{
result = 0; // not known
} }
return result; return result;

View File

@ -299,6 +299,13 @@ namespace bsmd.database
if (this.CrewMemberIdentityDocumentExpiryDate.Equals(new DateTime(2100, 12, 31))) 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)); 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 #endregion

View File

@ -356,6 +356,13 @@ namespace bsmd.database
if(this.PassengerIdentityDocumentExpiryDate.Equals(new DateTime(2100, 12, 31))) 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)); 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 #endregion