From fadc975b83b9c9b3bea0bd1785d16bdbe395b5ca Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Mon, 22 Jul 2024 14:20:12 +0200 Subject: [PATCH] Validation for SERV missing or not confirmed --- ENI2/DetailRootControl.xaml.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ENI2/DetailRootControl.xaml.cs b/ENI2/DetailRootControl.xaml.cs index 7925f615..cd52b04e 100644 --- a/ENI2/DetailRootControl.xaml.cs +++ b/ENI2/DetailRootControl.xaml.cs @@ -122,6 +122,7 @@ namespace ENI2 if ((aMessage.MessageNotificationClass == Message.NotificationClass.INFO) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "INFO"; return true; } if ((aMessage.MessageNotificationClass == Message.NotificationClass.SEC) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "SEC"; return true; } if ((aMessage.MessageNotificationClass == Message.NotificationClass.TIEFA) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "TIEFA"; return true; } + if ((aMessage.MessageNotificationClass == Message.NotificationClass.SERV) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "SERV"; return true; } } } @@ -748,6 +749,7 @@ namespace ENI2 Message mdhMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.MDH); Message was_rcptMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS_RCPT); Message wasMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.WAS); + Message servMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.SERV); #region CREW / PAS Count Plausibility @@ -1085,6 +1087,22 @@ namespace ENI2 #endregion + #region SERV existence for DEHAM / DEBRE / DEBRV + + if ((!this.Core.DisplayId.IsNullOrEmpty() && this.Core.DisplayId.StartsWith("DEHAM")) || this.Core.PoC.Equals("DEHAM") || + (!this.Core.DisplayId.IsNullOrEmpty() && this.Core.DisplayId.StartsWith("DEBRE")) || this.Core.PoC.Equals("DEBRE") || + (!this.Core.DisplayId.IsNullOrEmpty() && this.Core.DisplayId.StartsWith("DEBRV")) || this.Core.PoC.Equals("DEBRV")) + { + if (servMessage.Elements.Count == 0) + { + MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.LIST_EMPTY, "No entry for SERV found", null, "SERV service provider", null, "SERV"); + mv.MessageGroupName = Properties.Resources.textPortNotification; + vViolations.Add(mv); + } + } + + #endregion + #endregion foreach (MessageError me in vErrors)