Trellokarte:
Validierung ETAPortOfCall / ETDFromLastPort damit nicht versehentlich "alte" Datumswerte versendet werden zum Jahreswechsel
This commit is contained in:
parent
3e8a156ec9
commit
5979f40642
@ -250,6 +250,16 @@ namespace bsmd.database
|
||||
(this.ETDFromPortOfCall < this.ETAToPortOfCall))
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.E121, "ETDFromPortOfCall", this.ETDFromPortOfCall.ToString(), this.Title, null, this.Tablename));
|
||||
|
||||
// 8.11.20 Validierung gegen ETA /ETD in der Vergangenheit
|
||||
if(this.ETAToPortOfCall < DateTime.Now)
|
||||
{
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "ETAToPortOfCall", this.ETAToPortOfCall.Value.ToString(), this.Title, null, this.Tablename));
|
||||
}
|
||||
if(this.ETDFromLastPort < (DateTime.Now.AddDays(-14)))
|
||||
{
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "ETDFromLastPort", this.ETDFromLastPort.Value.ToString(), this.Title, null, this.Tablename));
|
||||
}
|
||||
|
||||
if (this.CallPurposes.IsNullOrEmpty())
|
||||
{
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.LIST_EMPTY, "CallPurposes", "CallPurpose", this.Title, null, this.Tablename));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user