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.Effects = reader.ReadCellAsText("2. PORT", string.Format("C{0}", i + 142));
Util.UIHelper.SetBusyState(); // dialog might reset busy state
}
return true;
@ -2237,6 +2239,8 @@ namespace ENI2.Excel
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);
@ -2478,6 +2482,10 @@ namespace ENI2.Excel
}
}
}
else
{
result = 0; // not known
}
return result;
}

View File

@ -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

View File

@ -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