diff --git a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs index 5abb4a01..8cf2dbe7 100644 --- a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs +++ b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs @@ -610,6 +610,33 @@ namespace ENI2 vViolations.AddRange(violations); } + #region 12.11.18: ein paar neue komische globale Plausi-Prüfungen + Message crewMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREW); + Message pasMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.PAS); + Message pobaMessage = _messages.Find(message => message.MessageNotificationClass == Message.NotificationClass.POBA); + + if (pobaMessage.Elements.Count == 1) + { + POBA poba = pobaMessage.Elements[0] as POBA; + + if (crewMessage.Elements.Count != poba.TotalCrewMembersOnBoardUponArrival) + { + MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "POBA crew member count different from CREW count!", null, "Crew count mismatch", null, "CREW"); + mv.MessageGroupName = Properties.Resources.textOverview; + vViolations.Add(mv); + } + + if(pasMessage.Elements.Count != poba.TotalPassengersOnBoardUponArrival) + { + MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "POBA passenger count different from PAS count!", null, "Passenger count mismatch", null, "PAS"); + mv.MessageGroupName = Properties.Resources.textOverview; + vViolations.Add(mv); + } + + } + + #endregion + foreach (MessageError me in vErrors) { this.highlightService.HighlightError(me, this.GetContainerForMessageGroupName(me.MessageGroupName)); diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml index 0463b64d..97f26563 100644 --- a/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml +++ b/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml @@ -56,7 +56,11 @@ -