NOA_NOD wip

This commit is contained in:
Daniel Schick 2022-10-03 12:29:38 +02:00
parent e44c92d0f9
commit 51efad579d

View File

@ -267,6 +267,11 @@ namespace bsmd.database
{
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETAToPortOfCall: might be implausible", this.ETAToPortOfCall.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));
}
// NSW 7.1 ETDFromLastPort Pflichtfeld, wenn LastPort != ZZUKN
if(!this.LastPort.IsNullOrEmpty() && !this.LastPort.Equals("ZZUKN") && !this.ETDFromLastPort.HasValue)
{
errors.Add(RuleEngine.CreateError(ValidationCode.E125, "ETDFromLastPort missing", "", this.Title, null, this.Tablename));
}
if((this.ETDFromLastPort < DateTime.Now.AddDays(-14)) || (this.ETDFromLastPort.HasValue && this.ETDFromLastPort.Value.ToLocalTime().IsTimeEmpty()))
{
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Check ETDFromLastPort: might be implausible", this.ETDFromLastPort.Value.ToLocalTime().ToString(), this.Title, null, this.Tablename));