From f6316e52dcab13712161658c807f23380eebaf05 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Tue, 9 May 2023 07:07:23 +0200 Subject: [PATCH] Validierung CREW DateOfBirth --- bsmd.database/CREW.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bsmd.database/CREW.cs b/bsmd.database/CREW.cs index f2262bd5..77827024 100644 --- a/bsmd.database/CREW.cs +++ b/bsmd.database/CREW.cs @@ -305,6 +305,9 @@ namespace bsmd.database violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Gender set to unknown", null, this.Title, this.Identifier, this.Tablename)); } + if ((this.CrewMemberDateOfBirth.HasValue) && (this.CrewMemberDateOfBirth.Value > DateTime.Today)) + violations.Add(RuleEngine.CreateViolation(ValidationCode.TIME_IMPLAUSIBLE, "Date of birth is in the future", null, this.Title, this.Identifier, this.Tablename)); + } #endregion