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 @@
-
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml
index 062d2ff6..19919dba 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml
@@ -140,7 +140,15 @@
-
+
+
+
+
+
+
+
+
@@ -154,6 +162,7 @@
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs
index 02ada9c8..d766c2d8 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs
@@ -384,6 +384,39 @@ namespace ENI2.DetailViewControls
#endregion
+ #region Copy l10p into Ship2Ship
+
+ private void buttonImportFromL10P_Click(object sender, RoutedEventArgs e)
+ {
+ if (this._sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Count > 0)
+ {
+ MessageBox.Show(Properties.Resources.textOnlyIfGridIsEmpty, Properties.Resources.textCaptionError, MessageBoxButton.OK, MessageBoxImage.Warning);
+ }
+ else
+ {
+ foreach(LastTenPortFacilitiesCalled l10c in this._sec.LastTenPortFacilitesCalled)
+ {
+ ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2s = new ShipToShipActivitiesDuringLastTenPortFacilitiesCalled();
+ s2s.SEC = this._sec;
+ s2s.Identifier = ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.GetNewIdentifier(this._sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled);
+ s2s.ShipToShipActivityLocationName = l10c.PortFacilityPortName;
+ s2s.ShipToShipActivityLocationLoCode = l10c.PortFacilityPortLoCode;
+ s2s.ShipToShipActivityDateFrom = l10c.PortFacilityDateOfArrival;
+ s2s.ShipToShipActivityDateTo = l10c.PortFacilityDateOfDeparture;
+ s2s.ShipToShipActivitySecurityMattersToReport = l10c.PortFacilitySecurityMattersToReport;
+
+ this._sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Add(s2s);
+ }
+ if(this._sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Count > 0)
+ {
+ this.dataGridShip2ShipActivities.Items.Refresh();
+ this.SublistElementChanged(Message.NotificationClass.SEC);
+ }
+ }
+ }
+
+ #endregion
+
#region enable / disable controls
private void CheckBoxKielCanalPassagePlanned_Checked(object sender, RoutedEventArgs e)
@@ -448,7 +481,7 @@ namespace ENI2.DetailViewControls
e.Handled = true;
}
- #endregion
+ #endregion
}
}
diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj
index 11102102..1f679040 100644
--- a/ENI-2/ENI2/ENI2/ENI2.csproj
+++ b/ENI-2/ENI2/ENI2/ENI2.csproj
@@ -35,7 +35,7 @@
3.5.1.0
true
publish.html
- 0
+ 1
5.0.3.%2a
false
true
diff --git a/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs b/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
index 87caf7f9..5193ae56 100644
--- a/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
+++ b/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
@@ -1430,6 +1430,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Copy from last 10 port facilities called.
+ ///
+ public static string textCopyFromL10P {
+ get {
+ return ResourceManager.GetString("textCopyFromL10P", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Copy to HAZD.
///
diff --git a/ENI-2/ENI2/ENI2/Properties/Resources.resx b/ENI-2/ENI2/ENI2/Properties/Resources.resx
index 1676697e..5d225235 100644
--- a/ENI-2/ENI2/ENI2/Properties/Resources.resx
+++ b/ENI-2/ENI2/ENI2/Properties/Resources.resx
@@ -1636,4 +1636,7 @@
..\Resources\id_card_new.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Copy from last 10 port facilities called
+
\ No newline at end of file
diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx
index ad554ad7..e0d9dd03 100644
Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ
diff --git a/nsw/Source/bsmd.database/BPOL.cs b/nsw/Source/bsmd.database/BPOL.cs
index 73828b35..fba48d54 100644
--- a/nsw/Source/bsmd.database/BPOL.cs
+++ b/nsw/Source/bsmd.database/BPOL.cs
@@ -179,7 +179,11 @@ namespace bsmd.database
bpol.poi = new ObservableCollection();
foreach (PortOfItinerary po in this.PortOfItineraries)
- bpol.PortOfItineraries.Add(po.Clone() as PortOfItinerary);
+ {
+ PortOfItinerary clonedPO = po.Clone() as PortOfItinerary;
+ clonedPO.BPOL = bpol;
+ bpol.PortOfItineraries.Add(clonedPO);
+ }
return bpol;
}
diff --git a/nsw/Source/bsmd.database/HAZ.cs b/nsw/Source/bsmd.database/HAZ.cs
index 5baa1f91..e4bddb6f 100644
--- a/nsw/Source/bsmd.database/HAZ.cs
+++ b/nsw/Source/bsmd.database/HAZ.cs
@@ -486,15 +486,35 @@ namespace bsmd.database
haz.marpolPositions = new ObservableCollection();
foreach (IMDGPosition imdgPosition in this.IMDGPositions)
- haz.IMDGPositions.Add(imdgPosition.Clone() as IMDGPosition);
+ {
+ IMDGPosition clonedIMDG = imdgPosition.Clone() as IMDGPosition;
+ clonedIMDG.HAZ = haz;
+ haz.IMDGPositions.Add(clonedIMDG);
+ }
foreach (IGCPosition igcPosition in this.IGCPositions)
- haz.IGCPositions.Add(igcPosition.Clone() as IGCPosition);
+ {
+ IGCPosition clonedIGC = igcPosition.Clone() as IGCPosition;
+ clonedIGC.HAZ = haz;
+ haz.IGCPositions.Add(clonedIGC);
+ }
foreach (IBCPosition ibcPosition in this.IBCPositions)
- haz.IBCPositions.Add(ibcPosition.Clone() as IBCPosition);
+ {
+ IBCPosition clonedIBC = ibcPosition.Clone() as IBCPosition;
+ clonedIBC.HAZ = haz;
+ haz.IBCPositions.Add(clonedIBC);
+ }
foreach (IMSBCPosition imsbcPosition in this.IMSBCPositions)
- haz.IMSBCPositions.Add(imsbcPosition.Clone() as IMSBCPosition);
+ {
+ IMSBCPosition clonedIMSBC = imsbcPosition.Clone() as IMSBCPosition;
+ clonedIMSBC.HAZ = haz;
+ haz.IMSBCPositions.Add(clonedIMSBC);
+ }
foreach (MARPOL_Annex_I_Position marpolPosition in this.MARPOLPositions)
- haz.MARPOLPositions.Add(marpolPosition.Clone() as MARPOL_Annex_I_Position);
+ {
+ MARPOL_Annex_I_Position clonedMARPOL = marpolPosition.Clone() as MARPOL_Annex_I_Position;
+ clonedMARPOL.HAZ = haz;
+ haz.MARPOLPositions.Add(clonedMARPOL);
+ }
return haz;
}
diff --git a/nsw/Source/bsmd.database/IMDGPosition.cs b/nsw/Source/bsmd.database/IMDGPosition.cs
index fb5284eb..ed94d2a9 100644
--- a/nsw/Source/bsmd.database/IMDGPosition.cs
+++ b/nsw/Source/bsmd.database/IMDGPosition.cs
@@ -526,7 +526,11 @@ namespace bsmd.database
imdg.subsidiaryRisksList = new List();
foreach (SubsidiaryRisks sr in this.SubsidiaryRiskList)
- imdg.SubsidiaryRiskList.Add(sr.Clone() as SubsidiaryRisks);
+ {
+ SubsidiaryRisks clonedSR = sr.Clone() as SubsidiaryRisks;
+ clonedSR.IMDGPosition = imdg;
+ imdg.SubsidiaryRiskList.Add(clonedSR);
+ }
return imdg;
}
diff --git a/nsw/Source/bsmd.database/MDH.cs b/nsw/Source/bsmd.database/MDH.cs
index a31e642a..16583e4f 100644
--- a/nsw/Source/bsmd.database/MDH.cs
+++ b/nsw/Source/bsmd.database/MDH.cs
@@ -576,16 +576,32 @@ namespace bsmd.database
mdh.stowawaysJoiningLocations = new ObservableCollection();
foreach (InfectedArea ia in this.InfectedAreas)
- mdh.InfectedAreas.Add(ia.Clone() as InfectedArea);
+ {
+ InfectedArea clonedIA = ia.Clone() as InfectedArea;
+ clonedIA.MDH = mdh;
+ mdh.InfectedAreas.Add(clonedIA);
+ }
foreach (PortOfCallLast30Days poc in this.PortOfCallLast30Days)
- mdh.PortOfCallLast30Days.Add(poc.Clone() as PortOfCallLast30Days);
+ {
+ PortOfCallLast30Days clonedPOC = poc.Clone() as PortOfCallLast30Days;
+ clonedPOC.MDH = mdh;
+ mdh.PortOfCallLast30Days.Add(clonedPOC);
+ }
foreach (SanitaryMeasuresDetail smd in this.sanitaryMeasuresDetails)
- mdh.SanitaryMeasuresDetails.Add(smd.Clone() as SanitaryMeasuresDetail);
+ {
+ SanitaryMeasuresDetail clonedSMD = smd.Clone() as SanitaryMeasuresDetail;
+ clonedSMD.MDH = mdh;
+ mdh.SanitaryMeasuresDetails.Add(clonedSMD);
+ }
foreach (StowawaysJoiningLocation sjl in this.StowawaysJoiningLocations)
- mdh.StowawaysJoiningLocations.Add(sjl.Clone() as StowawaysJoiningLocation);
+ {
+ StowawaysJoiningLocation clonedSJL = sjl.Clone() as StowawaysJoiningLocation;
+ clonedSJL.MDH = mdh;
+ mdh.StowawaysJoiningLocations.Add(clonedSJL);
+ }
return mdh;
}
diff --git a/nsw/Source/bsmd.database/NOA_NOD.cs b/nsw/Source/bsmd.database/NOA_NOD.cs
index 1421eed9..370c08f8 100644
--- a/nsw/Source/bsmd.database/NOA_NOD.cs
+++ b/nsw/Source/bsmd.database/NOA_NOD.cs
@@ -313,7 +313,11 @@ namespace bsmd.database
noanod.callPurposes = new ObservableCollection();
foreach (CallPurpose cp in this.CallPurposes)
- noanod.CallPurposes.Add(cp.Clone() as CallPurpose);
+ {
+ CallPurpose clonedCP = cp.Clone() as CallPurpose;
+ clonedCP.NOA_NOD = noanod;
+ noanod.CallPurposes.Add(clonedCP);
+ }
return noanod;
}
diff --git a/nsw/Source/bsmd.database/PortOfCallLast30Days.cs b/nsw/Source/bsmd.database/PortOfCallLast30Days.cs
index 53425968..36ffcf7c 100644
--- a/nsw/Source/bsmd.database/PortOfCallLast30Days.cs
+++ b/nsw/Source/bsmd.database/PortOfCallLast30Days.cs
@@ -275,7 +275,11 @@ namespace bsmd.database
p30.poc30Crew = new List();
foreach (PortOfCallLast30DaysCrewJoinedShip p30Crew in this.CrewJoinedShip)
- p30.CrewJoinedShip.Add(p30Crew.Clone() as PortOfCallLast30DaysCrewJoinedShip);
+ {
+ PortOfCallLast30DaysCrewJoinedShip clonedP30Crew = p30Crew.Clone() as PortOfCallLast30DaysCrewJoinedShip;
+ clonedP30Crew.PortOfCallLast30Days = p30;
+ p30.CrewJoinedShip.Add(clonedP30Crew);
+ }
return p30;
}
diff --git a/nsw/Source/bsmd.database/SEC.cs b/nsw/Source/bsmd.database/SEC.cs
index ecb4a476..98dcbc52 100644
--- a/nsw/Source/bsmd.database/SEC.cs
+++ b/nsw/Source/bsmd.database/SEC.cs
@@ -428,10 +428,18 @@ namespace bsmd.database
sec.ltpfc = new ObservableCollection();
foreach (LastTenPortFacilitiesCalled ltp in this.LastTenPortFacilitesCalled)
- sec.LastTenPortFacilitesCalled.Add(ltp.Clone() as bsmd.database.LastTenPortFacilitiesCalled);
+ {
+ bsmd.database.LastTenPortFacilitiesCalled clonedLTP = ltp.Clone() as bsmd.database.LastTenPortFacilitiesCalled;
+ clonedLTP.SEC = sec;
+ sec.LastTenPortFacilitesCalled.Add(clonedLTP);
+ }
foreach (ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2s in this.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)
- sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Add(s2s.Clone() as bsmd.database.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled);
+ {
+ ShipToShipActivitiesDuringLastTenPortFacilitiesCalled clonedS2S = s2s.Clone() as ShipToShipActivitiesDuringLastTenPortFacilitiesCalled;
+ clonedS2S.SEC = sec;
+ sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled.Add(clonedS2S);
+ }
return sec;
}
diff --git a/nsw/Source/bsmd.database/WAS.cs b/nsw/Source/bsmd.database/WAS.cs
index 6d582129..17db380c 100644
--- a/nsw/Source/bsmd.database/WAS.cs
+++ b/nsw/Source/bsmd.database/WAS.cs
@@ -450,10 +450,18 @@ namespace bsmd.database
was.wdsp = new ObservableCollection();
foreach (Waste waste in this.Waste)
- was.Waste.Add(waste.Clone() as Waste);
+ {
+ Waste clonedWaste = waste.Clone() as Waste;
+ clonedWaste.WAS = was;
+ was.Waste.Add(clonedWaste);
+ }
foreach (WasteDisposalServiceProvider wdsp in this.WasteDisposalServiceProvider)
- was.WasteDisposalServiceProvider.Add(wdsp.Clone() as WasteDisposalServiceProvider);
+ {
+ WasteDisposalServiceProvider clonedWDSP = wdsp.Clone() as WasteDisposalServiceProvider;
+ clonedWDSP.WAS = was;
+ was.WasteDisposalServiceProvider.Add(clonedWDSP);
+ }
return was;
diff --git a/nsw/Source/bsmd.dbh.ResponseService/IResponseService.cs b/nsw/Source/bsmd.dbh.ResponseService/IResponseService.cs
index a4c20723..45d79f8b 100644
--- a/nsw/Source/bsmd.dbh.ResponseService/IResponseService.cs
+++ b/nsw/Source/bsmd.dbh.ResponseService/IResponseService.cs
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.Serialization;
using System.ServiceModel;
-using System.ServiceModel.Web;
-using System.Text;
namespace bsmd.dbh.ResponseService
{
diff --git a/nsw/dbh/NSWResponse.xsd b/nsw/dbh/NSWResponse.xsd
index b9c3dd26..b5ff67bf 100644
--- a/nsw/dbh/NSWResponse.xsd
+++ b/nsw/dbh/NSWResponse.xsd
@@ -152,7 +152,7 @@
-
+
Errors, Violations, etc.