diff --git a/ENI2/Properties/Resources.Designer.cs b/ENI2/Properties/Resources.Designer.cs
index 10b436c9..67a8f811 100644
--- a/ENI2/Properties/Resources.Designer.cs
+++ b/ENI2/Properties/Resources.Designer.cs
@@ -5656,7 +5656,7 @@ namespace ENI2.Properties {
}
///
- /// Looks up a localized string similar to Cruise.
+ /// Looks up a localized string similar to 11 Cruise.
///
public static string textTab14 {
get {
diff --git a/ENI2/Properties/Resources.resx b/ENI2/Properties/Resources.resx
index 87000ee2..a012feb6 100644
--- a/ENI2/Properties/Resources.resx
+++ b/ENI2/Properties/Resources.resx
@@ -2195,7 +2195,7 @@
10 MDH
- Cruise
+ 11 Cruise
1-2 Berth
diff --git a/ENI2/SheetDisplayControls/PortControl.xaml b/ENI2/SheetDisplayControls/PortControl.xaml
index e8ea7c6d..513efbdb 100644
--- a/ENI2/SheetDisplayControls/PortControl.xaml
+++ b/ENI2/SheetDisplayControls/PortControl.xaml
@@ -8,9 +8,21 @@
xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:util="clr-namespace:ENI2.Util"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
+ xmlns:col="clr-namespace:System.Collections;assembly=mscorlib"
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
mc:Ignorable="d"
d:DesignHeight="1050" d:DesignWidth="800">
+
+
+
+
+
+
+
+
+
+
+
@@ -41,6 +53,7 @@
+
@@ -95,6 +108,7 @@
+
@@ -164,7 +178,9 @@
-
+
+
+
diff --git a/ENI2/SheetDisplayControls/PortControl.xaml.cs b/ENI2/SheetDisplayControls/PortControl.xaml.cs
index 74ff3640..18672a58 100644
--- a/ENI2/SheetDisplayControls/PortControl.xaml.cs
+++ b/ENI2/SheetDisplayControls/PortControl.xaml.cs
@@ -7,6 +7,7 @@ using ENI2.EditControls;
using ExcelDataReader;
using Microsoft.Win32;
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -132,6 +133,18 @@ namespace ENI2.SheetDisplayControls
this.comboBox_AgentTemplate.ItemsSource = _agntTemplates;
// 2.4
+
+ #region init helper Maersk / SeaGo Field
+
+ if (this.Core.IsFlagSet(MessageCore.CoreFlags.MAERSK_BHV)) this.comboBoxGroup.SelectedIndex = 1;
+ if (this.Core.IsFlagSet(MessageCore.CoreFlags.SEAGO_BHV)) this.comboBoxGroup.SelectedIndex = 2;
+ if (this.Core.IsFlagSet(MessageCore.CoreFlags.SEAGO_WHV)) this.comboBoxGroup.SelectedIndex = 3;
+ if (this.Core.IsFlagSet(MessageCore.CoreFlags.HOEGH)) this.comboBoxGroup.SelectedIndex = 4;
+ if (this.Core.IsFlagSet(MessageCore.CoreFlags.ELBE_BULK)) this.comboBoxGroup.SelectedIndex = 5;
+ if (this.Core.IsFlagSet(MessageCore.CoreFlags.FCT_JUNGE)) this.comboBoxGroup.SelectedIndex = 6;
+
+ #endregion
+
this.dataGridSERV.Initialize();
this.dataGridSERV.ItemsSource = this._servMessage.Elements;
this.dataGridSERV.AddingNewItem += DataGridSERV_AddingNewItem;
@@ -543,6 +556,156 @@ namespace ENI2.SheetDisplayControls
}
}
+ private void comboBoxGroup_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ // clear all
+ this.Core.SetFlag(false, MessageCore.CoreFlags.MAERSK_BHV);
+ this.Core.SetFlag(false, MessageCore.CoreFlags.SEAGO_BHV);
+ this.Core.SetFlag(false, MessageCore.CoreFlags.SEAGO_WHV);
+ this.Core.SetFlag(false, MessageCore.CoreFlags.HOEGH);
+ this.Core.SetFlag(false, MessageCore.CoreFlags.ELBE_BULK);
+ this.Core.SetFlag(false, MessageCore.CoreFlags.FCT_JUNGE);
+
+ if (this.comboBoxGroup.SelectedItem == null)
+ {
+ this.comboBoxGroup.SelectedIndex = 0;
+ DBManager.Instance.Save(this.Core);
+ }
+ else
+ {
+ DictionaryEntry selectedItem = (DictionaryEntry)this.comboBoxGroup.SelectedItem;
+ if (Int32.TryParse((string)selectedItem.Value, out int selectedValue))
+ {
+ if (selectedValue == (int)MessageCore.CoreFlags.MAERSK_BHV) CheckServiceEntryMaerskBHV();
+ if (selectedValue == (int)MessageCore.CoreFlags.SEAGO_BHV) CheckServiceEntrySeaGoBHV();
+ if (selectedValue == (int)MessageCore.CoreFlags.HOEGH) CheckServiceEntryHoegh();
+ if (selectedValue == (int)MessageCore.CoreFlags.ELBE_BULK) CheckServiceEntryElbeBulk();
+ if (selectedValue == (int)MessageCore.CoreFlags.FCT_JUNGE) CheckServiceEntryFctJunge();
+ this.Core.SetFlag(true, (MessageCore.CoreFlags)selectedValue);
+ DBManager.Instance.Save(this.Core);
+ }
+ }
+ }
+
+ #endregion
+
+ #region special entry ship service check
+
+ private void CheckServiceEntryMaerskBHV()
+ {
+ bool found = false;
+ foreach (SERV serv in _servMessage.Elements.Cast())
+ {
+ if (serv.ServiceBeneficiary.Equals("Maersk A/S, Esplanaden 50, DK-1263 Copenhagen K, VAT-ID: DK53139655"))
+ found = true;
+ }
+
+ if (!found)
+ {
+ SERV newServ = new SERV();
+ newServ.ServiceBeneficiary = "Maersk A/S, Esplanaden 50, DK-1263 Copenhagen K, VAT-ID: DK53139655";
+ newServ.ServiceInvoiceRecipient = "Maersk Deutschland A/S & Co.KG, Johanniswall 7, 20095 Hamburg";
+ newServ.ServiceName = "Maersk BHV";
+ newServ.MessageHeader = this._servMessage;
+ newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
+ this._servMessage.Elements.Add(newServ);
+ this.dataGridSERV.Items.Refresh();
+ this.SublistElementChanged(Message.NotificationClass.SERV);
+ }
+ }
+
+ private void CheckServiceEntrySeaGoBHV()
+ {
+ bool found = false;
+ foreach (SERV serv in _servMessage.Elements.Cast())
+ {
+ if (serv.ServiceBeneficiary.Equals("Sealand Europe A/S, Dampfaergevej 10, 3.tv, DK- 2100 Copenhagen, VAT-ID: DK53139655"))
+ found = true;
+ }
+
+ if (!found)
+ {
+ SERV newServ = new SERV();
+ newServ.ServiceBeneficiary = "Sealand Europe A/S, Dampfaergevej 10, 3.tv, DK- 2100 Copenhagen, VAT-ID: DK53139655";
+ newServ.ServiceInvoiceRecipient = "Maersk Deutschland A/S & Co. KG on behalf of Sealand Europe A/S, Johanniswall 7, 20095 Hamburg";
+ newServ.ServiceName = "SeaGo BHV";
+ newServ.MessageHeader = this._servMessage;
+ newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
+ this._servMessage.Elements.Add(newServ);
+ this.dataGridSERV.Items.Refresh();
+ this.SublistElementChanged(Message.NotificationClass.SERV);
+ }
+ }
+
+ private void CheckServiceEntryHoegh()
+ {
+ bool found = false;
+ foreach (SERV serv in _servMessage.Elements.Cast())
+ {
+ if (serv.ServiceBeneficiary.Equals("Höegh Autoliners AS, Oslo, Norway"))
+ found = true;
+ }
+
+ if (!found)
+ {
+ SERV newServ = new SERV();
+ newServ.ServiceBeneficiary = "Höegh Autoliners AS, Oslo, Norway";
+ newServ.ServiceInvoiceRecipient = " PWL Port Services GmbH & Co. KG";
+ newServ.ServiceName = "HOEGH BHV";
+ newServ.MessageHeader = this._servMessage;
+ newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
+ this._servMessage.Elements.Add(newServ);
+ this.dataGridSERV.Items.Refresh();
+ this.SublistElementChanged(Message.NotificationClass.SERV);
+ }
+ }
+
+ private void CheckServiceEntryFctJunge()
+ {
+ bool found = false;
+ foreach (SERV serv in _servMessage.Elements.Cast())
+ {
+ if (serv.ServiceName.Equals("Fct Junge - Hamburg"))
+ found = true;
+ }
+
+ if (!found)
+ {
+ SERV newServ = new SERV();
+ newServ.ServiceBeneficiary = "";
+ newServ.ServiceInvoiceRecipient = " Frachtcontor Junge & Co. GmbH";
+ newServ.ServiceName = "Fct Junge - Hamburg";
+ newServ.MessageHeader = this._servMessage;
+ newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
+ this._servMessage.Elements.Add(newServ);
+ this.dataGridSERV.Items.Refresh();
+ this.SublistElementChanged(Message.NotificationClass.SERV);
+ }
+ }
+
+ private void CheckServiceEntryElbeBulk()
+ {
+ bool found = false;
+ foreach (SERV serv in _servMessage.Elements.Cast())
+ {
+ if (serv.ServiceName.Equals("Elbe Bulk Schiffe - Hamburg"))
+ found = true;
+ }
+
+ if (!found)
+ {
+ SERV newServ = new SERV();
+ newServ.ServiceBeneficiary = "";
+ newServ.ServiceInvoiceRecipient = " Division Elbe Bulk, Frachtcontor Junge & Co. GmbH";
+ newServ.ServiceName = "Elbe Bulk Schiffe - Hamburg";
+ newServ.MessageHeader = this._servMessage;
+ newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
+ this._servMessage.Elements.Add(newServ);
+ this.dataGridSERV.Items.Refresh();
+ this.SublistElementChanged(Message.NotificationClass.SERV);
+ }
+ }
+
#endregion
#region Templates
@@ -962,7 +1125,7 @@ namespace ENI2.SheetDisplayControls
this.DataGridWaste_CreateRequested();
}
- #endregion
-
+ #endregion
+
}
}
diff --git a/ENI2/SheetDisplayControls/VoyageControl.xaml b/ENI2/SheetDisplayControls/VoyageControl.xaml
index 3e3c6089..86ff7422 100644
--- a/ENI2/SheetDisplayControls/VoyageControl.xaml
+++ b/ENI2/SheetDisplayControls/VoyageControl.xaml
@@ -111,11 +111,11 @@
-
+
-
+
diff --git a/ENI2/SheetDisplayControls/VoyageControl.xaml.cs b/ENI2/SheetDisplayControls/VoyageControl.xaml.cs
index e4fc9824..40fd6b2d 100644
--- a/ENI2/SheetDisplayControls/VoyageControl.xaml.cs
+++ b/ENI2/SheetDisplayControls/VoyageControl.xaml.cs
@@ -100,6 +100,7 @@ namespace ENI2.SheetDisplayControls
// 1.7
this.dataGridLast10PortFacilities.Initialize();
this.dataGridLast10PortFacilities.ItemsSource = _sec.LastTenPortFacilitesCalled;
+ this.textBlockNumL10PEntries.DataContext = _sec;
this.dataGridLast10PortFacilities.AddingNewItem += DataGridLast10PortFacilities_AddingNewItem;
this.dataGridLast10PortFacilities.EditRequested += DataGridLast10PortFacilities_EditRequested;
@@ -107,6 +108,7 @@ namespace ENI2.SheetDisplayControls
this.dataGridLast10PortFacilities.CreateRequested += DataGridLast10PortFacilities_CreateRequested;
// 1.8
+ this.textBlockNumS2SEntries.DataContext = _sec;
this.dataGridShip2ShipActivities.Initialize();
foreach (ShipToShipActivitiesDuringLastTenPortFacilitiesCalled s2s in _sec.ShipToShipActivitiesDuringLastTenPortFacilitiesCalled)
{
@@ -120,6 +122,7 @@ namespace ENI2.SheetDisplayControls
this.dataGridShip2ShipActivities.CreateRequested += DataGridShip2ShipActivities_CreateRequested;
// 1.9
+ this.textBlockNumPoCEntries.DataContext = _mdh;
this.dataGridPortOfCallLast30Days.Initialize();
this.dataGridPortOfCallLast30Days.ItemsSource = _mdh.PortOfCallLast30Days;
this.dataGridPortOfCallLast30Days.AddingNewItem += DataGridPortOfCallLast30Days_AddingNewItem;
diff --git a/ENI2/SheetDisplayControls/WasteReceiptsControl.xaml b/ENI2/SheetDisplayControls/WasteReceiptsControl.xaml
index cbcef748..aa7291e0 100644
--- a/ENI2/SheetDisplayControls/WasteReceiptsControl.xaml
+++ b/ENI2/SheetDisplayControls/WasteReceiptsControl.xaml
@@ -10,7 +10,7 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
mc:Ignorable="d"
- d:DesignHeight="600" d:DesignWidth="800">
+ d:DesignHeight="1200" d:DesignWidth="800">
@@ -20,16 +20,16 @@
-
+
-
+
-
+