From a70b020eefbb93b9bdc39eab3e1787eeaf547f32 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Wed, 21 Mar 2018 08:59:31 +0000 Subject: [PATCH] =?UTF-8?q?Version=205.0.3=20f=C3=BCr=20Go-live=20HIS-Nord?= =?UTF-8?q?=20NSW=205.0=20am=2021.3.2018?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DangerousGoodsDetailControl.xaml.cs | 28 +++++++++++++- ...aritimeHealthDeclarationDetailControl.xaml | 2 +- .../SecurityDetailControl.xaml | 11 +++++- .../SecurityDetailControl.xaml.cs | 35 +++++++++++++++++- ENI-2/ENI2/ENI2/ENI2.csproj | 2 +- .../ENI2/Properties/Resources.Designer.cs | 9 +++++ ENI-2/ENI2/ENI2/Properties/Resources.resx | 3 ++ Stundensheet.xlsx | Bin 36831 -> 36935 bytes nsw/Source/bsmd.database/BPOL.cs | 6 ++- nsw/Source/bsmd.database/HAZ.cs | 30 ++++++++++++--- nsw/Source/bsmd.database/IMDGPosition.cs | 6 ++- nsw/Source/bsmd.database/MDH.cs | 24 ++++++++++-- nsw/Source/bsmd.database/NOA_NOD.cs | 6 ++- .../bsmd.database/PortOfCallLast30Days.cs | 6 ++- nsw/Source/bsmd.database/SEC.cs | 12 +++++- nsw/Source/bsmd.database/WAS.cs | 12 +++++- .../IResponseService.cs | 4 -- nsw/dbh/NSWResponse.xsd | 2 +- 18 files changed, 171 insertions(+), 27 deletions(-) diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs index 649ebd43..ed6e4407 100644 --- a/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs +++ b/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs @@ -303,6 +303,20 @@ namespace ENI2.DetailViewControls #endregion + /// + /// Beim Hinzufügen der allerersten Gefahrgutposition sollen die Flags vorbelegt werden + /// + void SetHAZGlobalFlags() + { + int totalCount = this.haz.MARPOLPositions.Count + this.haz.IMDGPositions.Count + this.haz.IGCPositions.Count + this.haz.IBCPositions.Count + this.haz.IMSBCPositions.Count; + if(totalCount == 1) + { + if (!(this.checkBoxDangerousGoodsOnBoard.IsChecked ?? false)) this.checkBoxDangerousGoodsOnBoard.IsChecked = true; + if(!(this.checkBoxDGManifestOnBoard.IsChecked ?? false)) this.checkBoxDGManifestOnBoard.IsChecked = true; + if (this.checkBoxMoUBaltic.IsChecked ?? true) this.checkBoxMoUBaltic.IsChecked = false; + } + } + #region MARPOL datagrid handlers private void DataGridMARPOLItems_DeleteRequested(DatabaseEntity obj) @@ -334,6 +348,7 @@ namespace ENI2.DetailViewControls eld.Identifier = DatabaseEntity.GetNewIdentifier(haz.MARPOLPositions, "MARPOL-"); eld.MARPOL.HAZ = this.haz; this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SetHAZGlobalFlags(); }; if (eld.ShowDialog() ?? false) @@ -341,7 +356,7 @@ namespace ENI2.DetailViewControls if (!haz.MARPOLPositions.Contains(eld.MARPOL)) haz.MARPOLPositions.Add(eld.MARPOL); this.dataGridMARPOLItems.Items.Refresh(); - this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); } } @@ -368,6 +383,7 @@ namespace ENI2.DetailViewControls ebd.MARPOL.HAZ = this.haz; ebd.Identifier = DatabaseEntity.GetNewIdentifier(this.haz.MARPOLPositions, "MARPOL-"); this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SetHAZGlobalFlags(); }; if (ebd.ShowDialog() ?? false) @@ -376,6 +392,7 @@ namespace ENI2.DetailViewControls haz.MARPOLPositions.Add(ebd.MARPOL); this.dataGridMARPOLItems.Items.Refresh(); this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SetHAZGlobalFlags(); } } @@ -412,6 +429,7 @@ namespace ENI2.DetailViewControls eld.Identifier = DatabaseEntity.GetNewIdentifier(this.haz.IMSBCPositions, "IMSBC-"); eld.IMSBC.HAZ = this.haz; this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SetHAZGlobalFlags(); }; if (eld.ShowDialog() ?? false) @@ -445,6 +463,7 @@ namespace ENI2.DetailViewControls ebd.IMSBC.HAZ = this.haz; ebd.Identifier = DatabaseEntity.GetNewIdentifier(this.haz.IMSBCPositions, "IMSBC-"); this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SetHAZGlobalFlags(); }; if (ebd.ShowDialog() ?? false) @@ -453,6 +472,7 @@ namespace ENI2.DetailViewControls haz.IMSBCPositions.Add(ebd.IMSBC); this.dataGridIMSBCItems.Items.Refresh(); this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SetHAZGlobalFlags(); } } @@ -489,6 +509,7 @@ namespace ENI2.DetailViewControls eld.Identifier = DatabaseEntity.GetNewIdentifier(this.haz.IGCPositions, "IGC-"); eld.IGC.HAZ = this.haz; this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SetHAZGlobalFlags(); }; if (eld.ShowDialog() ?? false) @@ -530,6 +551,7 @@ namespace ENI2.DetailViewControls haz.IGCPositions.Add(ebd.IGC); this.dataGridIGCItems.Items.Refresh(); this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SetHAZGlobalFlags(); } } @@ -566,6 +588,7 @@ namespace ENI2.DetailViewControls eld.Identifier = DatabaseEntity.GetNewIdentifier(this.haz.IBCPositions, "IBC-"); eld.IBC.HAZ = this.haz; this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SetHAZGlobalFlags(); }; if (eld.ShowDialog() ?? false) @@ -607,6 +630,7 @@ namespace ENI2.DetailViewControls haz.IBCPositions.Add(ebd.IBC); this.dataGridIBCItems.Items.Refresh(); this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SetHAZGlobalFlags(); } } @@ -651,6 +675,7 @@ namespace ENI2.DetailViewControls haz.IMDGPositions.Add(eld.IMDG); this.dataGridIMDGItems.Items.Refresh(); this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SetHAZGlobalFlags(); } } @@ -684,6 +709,7 @@ namespace ENI2.DetailViewControls haz.IMDGPositions.Add(ebd.IMDG); this.dataGridIMDGItems.Items.Refresh(); this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA); + this.SetHAZGlobalFlags(); } } diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml index 7cd226c2..88cc79a7 100644 --- a/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml +++ b/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml @@ -93,7 +93,7 @@ -