From 07b57ed25975c41025638914f873ac22472825e2 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Fri, 24 Nov 2017 13:07:25 +0000 Subject: [PATCH] =?UTF-8?q?Version=20=203.8.9=20Validierung=20(zu=20Fu?= =?UTF-8?q?=C3=9F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs | 11 ++++-- .../PortNotificationDetailControl.xaml | 4 +-- .../SecurityDetailControl.xaml.cs | 9 ++--- .../ShipDataDetailControl.xaml | 4 +-- .../WasteDetailControl.xaml.cs | 7 ++-- ENI-2/ENI2/ENI2/ENI2.csproj | 2 +- .../ENI2/EditControls/EditWasteDialog.xaml.cs | 4 +-- ENI-2/ENI2/ENI2/MainWindow.xaml | 6 ++-- ENI-2/ENI2/ENI2/MainWindow.xaml.cs | 9 ++--- .../ENI2/Properties/Resources.Designer.cs | 9 +++++ ENI-2/ENI2/ENI2/Properties/Resources.resx | 3 ++ nsw/Source/bsmd.ExcelReadService/Util.cs | 4 +-- nsw/Source/bsmd.database/IMDGPosition.cs | 4 +++ nsw/Source/bsmd.database/IMSBCPosition.cs | 15 +++++++- nsw/Source/bsmd.database/INFO.cs | 2 +- .../LastTenPortFacilitiesCalled.cs | 6 ++-- nsw/Source/bsmd.database/Message.cs | 36 +++++++++++++++++++ nsw/Source/bsmd.database/NOA_NOD.cs | 8 ++++- nsw/Source/bsmd.database/POBA.cs | 12 +++++++ nsw/Source/bsmd.database/POBD.cs | 10 ++++++ .../bsmd.database/PortOfCallLast30Days.cs | 14 ++++---- .../PortOfCallLast30DaysCrewJoinedShip.cs | 2 +- .../Properties/AssemblyProductInfo.cs | 2 +- .../Properties/AssemblyProjectInfo.cs | 2 +- nsw/Source/bsmd.database/RuleEngine.cs | 2 +- nsw/Source/bsmd.database/SEC.cs | 35 +++++++++++------- ...vitiesDuringLastTenPortFacilitiesCalled.cs | 15 ++++++-- .../bsmd.database/ValidationAttribute.cs | 4 +++ nsw/Source/bsmd.database/ValidationRule.cs | 3 +- nsw/Source/bsmd.database/WAS.cs | 36 ++++++++++++++++++- nsw/Source/bsmd.database/Waste.cs | 1 + 31 files changed, 219 insertions(+), 62 deletions(-) diff --git a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs index b8bb7e2d..16fd4f11 100644 --- a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs +++ b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs @@ -382,6 +382,8 @@ namespace ENI2 RuleEngine ruleEngine = new RuleEngine(); foreach (Message aMessage in _messages) { + if (!aMessage.EvaluateForValidation(this.Core.IsTransit)) continue; + List errors = new List(); List violations = new List(); ruleEngine.ValidateMessage(aMessage, out errors, out violations); @@ -455,6 +457,12 @@ namespace ENI2 vld.Violations = this._vViolations; vld.Show(); } + + if((this._vErrors.Count == 0) && (this._vViolations.Count == 0)) + { + MessageBox.Show(Properties.Resources.textValidationOK, Properties.Resources.textValidation, MessageBoxButton.OK, MessageBoxImage.Information); + } + } } @@ -501,8 +509,7 @@ namespace ENI2 return Properties.Resources.textDepartureNotification; case Message.NotificationClass.MDH: return Properties.Resources.textMDH; - case Message.NotificationClass.NOA_NOD: - return Properties.Resources.textOverview; + case Message.NotificationClass.NOA_NOD: case Message.NotificationClass.AGNT: return Properties.Resources.textPortCall; case Message.NotificationClass.NAME: diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/PortNotificationDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/PortNotificationDetailControl.xaml index 920f720c..aa84b2d3 100644 --- a/ENI-2/ENI2/ENI2/DetailViewControls/PortNotificationDetailControl.xaml +++ b/ENI-2/ENI2/ENI2/DetailViewControls/PortNotificationDetailControl.xaml @@ -68,7 +68,7 @@ + AutoGenerateColumns="False" Margin="0,5,0,0"> @@ -80,7 +80,7 @@ + AutoGenerateColumns="False" Margin="0,5,0,0"> diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs index 2f4074e9..09716051 100644 --- a/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs +++ b/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs @@ -93,6 +93,10 @@ namespace ENI2.DetailViewControls this.dataGridShip2ShipActivities.DeleteRequested += DataGridShip2ShipActivities_DeleteRequested; this.dataGridShip2ShipActivities.CreateRequested += DataGridShip2ShipActivities_CreateRequested; + this.checkBoxSECSimplification.Checked += CheckBoxSECSimplification_Checked; + this.checkBoxSECSimplification.Unchecked += CheckBoxSECSimplification_Checked; + this.checkBoxKielCanalPassagePlanned.Checked += CheckBoxKielCanalPassagePlanned_Checked; + #endregion } @@ -288,10 +292,7 @@ namespace ENI2.DetailViewControls this.RegisterCheckboxChange(this.checkBoxValidISSCOnBoard, Message.NotificationClass.SEC); this.RegisterLocodeChange(this.locodePortOfCallWhereCompleteSECNotified, Message.NotificationClass.SEC); - - this.checkBoxSECSimplification.Checked += CheckBoxSECSimplification_Checked; - this.checkBoxSECSimplification.Unchecked += CheckBoxSECSimplification_Checked; - this.checkBoxKielCanalPassagePlanned.Checked += CheckBoxKielCanalPassagePlanned_Checked; + } #endregion diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml index a113487d..4823a701 100644 --- a/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml +++ b/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml @@ -50,7 +50,7 @@ - + @@ -61,7 +61,7 @@