diff --git a/ENI-2/ENI2/ENI2/App.config b/ENI-2/ENI2/ENI2/App.config
index 59067348..0a568992 100644
--- a/ENI-2/ENI2/ENI2/App.config
+++ b/ENI-2/ENI2/ENI2/App.config
@@ -26,12 +26,12 @@
1000
- http://192.168.2.4/LockingService/LockingService.svc
-
+
+ http://heupferd/bsmd.LockingService/LockingService.svc
- Data Source=192.168.2.12;Initial Catalog=nsw;Uid=dfuser;Pwd=dfpasswd;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False
-
+
+ Data Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False
diff --git a/ENI-2/ENI2/ENI2/Controls/ENIDataGrid.cs b/ENI-2/ENI2/ENI2/Controls/ENIDataGrid.cs
index a50a1566..96940938 100644
--- a/ENI-2/ENI2/ENI2/Controls/ENIDataGrid.cs
+++ b/ENI-2/ENI2/ENI2/Controls/ENIDataGrid.cs
@@ -120,12 +120,13 @@ namespace ENI2.Controls
protected void addItem(object sender, RoutedEventArgs e)
{
- this.CreateRequested?.Invoke();
+ if(!this.IsReadOnly)
+ this.CreateRequested?.Invoke();
}
protected void deleteItem(object sender, RoutedEventArgs e)
{
- if((this.SelectedItems != null) && (this.SelectedItems.Count == 1))
+ if((this.SelectedItems != null) && (this.SelectedItems.Count == 1) && !this.IsReadOnly)
{
MessageBoxResult result = MessageBox.Show(Properties.Resources.textAreYouSure, Properties.Resources.textCaptionDeleteConfirm, MessageBoxButton.YesNo, MessageBoxImage.Question);
if (result == MessageBoxResult.Yes)
@@ -140,7 +141,7 @@ namespace ENI2.Controls
protected void editItem(object sender, RoutedEventArgs e)
{
- if((this.SelectedItems != null) && (this.SelectedItems.Count == 1))
+ if((this.SelectedItems != null) && (this.SelectedItems.Count == 1) && !this.IsReadOnly)
{
DatabaseEntity selectedEntity = this.SelectedItems[0] as DatabaseEntity;
if (selectedEntity != null)
@@ -150,7 +151,7 @@ namespace ENI2.Controls
protected void printItem(object sender, RoutedEventArgs e)
{
- if ((this.SelectedItems != null) && (this.SelectedItems.Count == 1))
+ if ((this.SelectedItems != null) && (this.SelectedItems.Count == 1) )
{
DatabaseEntity selectedEntity = this.SelectedItems[0] as DatabaseEntity;
if (selectedEntity != null)
@@ -183,7 +184,7 @@ namespace ENI2.Controls
if (sender != null)
{
DataGrid grid = sender as DataGrid;
- if ((grid != null) && (grid.SelectedItems != null) && (grid.SelectedItems.Count == 1))
+ if ((grid != null) && (grid.SelectedItems != null) && (grid.SelectedItems.Count == 1) && !this.IsReadOnly)
{
DataGridRow dgr = grid.ItemContainerGenerator.ContainerFromItem(grid.SelectedItem) as DataGridRow;
DatabaseEntity selectedEntity = grid.SelectedItem as DatabaseEntity;
diff --git a/ENI-2/ENI2/ENI2/Controls/EditWindowBase.cs b/ENI-2/ENI2/ENI2/Controls/EditWindowBase.cs
index 632b63e3..2b743070 100644
--- a/ENI-2/ENI2/ENI2/Controls/EditWindowBase.cs
+++ b/ENI-2/ENI2/ENI2/Controls/EditWindowBase.cs
@@ -6,6 +6,9 @@ using System;
using System.Windows;
using System.Windows.Controls;
using System.ComponentModel;
+using System.Windows.Data;
+using System.Linq;
+using bsmd.database;
namespace ENI2.Controls
{
@@ -75,5 +78,38 @@ namespace ENI2.Controls
OKClicked?.Invoke();
}
+ #region combobox content filtering
+
+ protected void ComboBox_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
+ {
+ ComboBox cmb = sender as ComboBox;
+ if (cmb == null) return;
+ CollectionView itemsViewOriginal = (CollectionView)CollectionViewSource.GetDefaultView(cmb.ItemsSource);
+
+ itemsViewOriginal.Filter = ((o) =>
+ {
+ bool result = false;
+ if (String.IsNullOrEmpty(cmb.Text))
+ {
+ result = true;
+ }
+ else
+ {
+ if(o is System.Collections.Generic.KeyValuePair)
+ if(((System.Collections.Generic.KeyValuePair)o).Value.StartsWith(cmb.Text, StringComparison.OrdinalIgnoreCase))
+ result = true;
+ if(o is string)
+ if (((string)o).Contains(cmb.Text, StringComparison.OrdinalIgnoreCase)) result = true;
+ }
+ //System.Diagnostics.Trace.WriteLine(string.Format("{0} - {1} - {2}", o, cmb.Text, result));
+ return result;
+ });
+
+ //System.Diagnostics.Trace.WriteLine("---");
+ itemsViewOriginal.Refresh();
+ }
+
+ #endregion
+
}
}
diff --git a/ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml.cs b/ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml.cs
index 3d713761..781a9a21 100644
--- a/ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/Controls/LocodeControl.xaml.cs
@@ -54,7 +54,7 @@ namespace ENI2.Controls
// Get instance of current control from sender
// and property value from e.NewValue
- if (e.NewValue != null)
+ if ((e.NewValue != null) && (e.NewValue.ToString().Trim() != ""))
((LocodeControl)sender).SelectedItem = e.NewValue.ToString();//.Substring(0,5);
}
diff --git a/ENI-2/ENI2/ENI2/DetailBaseControl.cs b/ENI-2/ENI2/ENI2/DetailBaseControl.cs
index 8a58f5d7..f70ff10c 100644
--- a/ENI-2/ENI2/ENI2/DetailBaseControl.cs
+++ b/ENI-2/ENI2/ENI2/DetailBaseControl.cs
@@ -9,6 +9,7 @@ using System.Windows.Controls;
using bsmd.database;
using System.Windows.Media.Imaging;
using System.ComponentModel;
+using System.Windows.Data;
namespace ENI2
{
@@ -212,6 +213,35 @@ namespace ENI2
#endregion
+ #region combobox content filtering
+
+ protected void ComboBox_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
+ {
+ ComboBox cmb = sender as ComboBox;
+ if (cmb == null) return;
+ CollectionView itemsViewOriginal = (CollectionView)CollectionViewSource.GetDefaultView(cmb.ItemsSource);
+
+ itemsViewOriginal.Filter = ((o) =>
+ {
+ bool result = false;
+ if (String.IsNullOrEmpty(cmb.Text))
+ {
+ result = true;
+ }
+ else if(o is string)
+ {
+ if (((string)o).Contains(cmb.Text, StringComparison.OrdinalIgnoreCase)) result = true;
+ }
+ //System.Diagnostics.Trace.WriteLine(string.Format("{0} - {1} - {2}", o, cmb.Text, result));
+ return result;
+ });
+
+ //System.Diagnostics.Trace.WriteLine("---");
+ itemsViewOriginal.Refresh();
+ }
+
+ #endregion
+
#endregion
diff --git a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs
index 8f4a5c66..3d170931 100644
--- a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs
@@ -109,6 +109,9 @@ namespace ENI2
{
// create control instance for display:
DetailBaseControl detailControl = (DetailBaseControl)Activator.CreateInstance(mg.MessageGroupControlType);
+ // Spezial-Balkon für die Wiederverwendung von HAZD / HAZA als ein Control (es tut mir leid :D)
+ if (mg.MessageGroupName.Equals(Properties.Resources.textDGDeparture))
+ ((DangerousGoodsDetailControl)detailControl).IsDeparture = true;
detailControl.Core = _core;
detailControl.Messages = _messages;
detailControl.LockedByOtherUser = this.LockedByOtherUser;
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/ArrivalNotificationDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/ArrivalNotificationDetailControl.xaml
index 44cb9895..7878b045 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/ArrivalNotificationDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/ArrivalNotificationDetailControl.xaml
@@ -29,7 +29,7 @@
-
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml
index 42fed0dc..9437e8f6 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml
@@ -5,9 +5,100 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ENI2.DetailViewControls"
+ xmlns:p="clr-namespace:ENI2.Properties"
+ xmlns:enictrl="clr-namespace:ENI2.Controls"
+ xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
-
-
-
+ d:DesignHeight="768" d:DesignWidth="1024">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs
index 5861ae7e..5a83fdbd 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs
@@ -2,20 +2,10 @@
// Description: Für Arrival / Departure
//
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
+
+using bsmd.database;
+using ENI2.EditControls;
namespace ENI2.DetailViewControls
{
@@ -24,9 +14,453 @@ namespace ENI2.DetailViewControls
///
public partial class DangerousGoodsDetailControl : DetailBaseControl
{
+
+ private Message _hazMessage;
+ private HAZ haz;
+
public DangerousGoodsDetailControl()
{
InitializeComponent();
+ this.Loaded += DangerousGoodsDetailControl_Loaded;
}
+
+ private void DangerousGoodsDetailControl_Loaded(object sender, RoutedEventArgs e)
+ {
+ this.RegisterCheckboxChange(this.checkBoxDangerousGoodsOnBoard, this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ this.RegisterCheckboxChange(this.checkBoxDGManifestOnBoard, this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ this.RegisterCheckboxChange(this.checkBoxMoUBaltic, this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ this.RegisterComboboxIndexChange(this.comboBoxVesselClass, this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ }
+
+ public bool IsDeparture { get; set; }
+
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ foreach (Message aMessage in this.Messages)
+ {
+ if(IsDeparture)
+ if (aMessage.MessageNotificationClass == Message.NotificationClass.HAZD) { this._hazMessage = aMessage; this.ControlMessages.Add(aMessage); }
+ else
+ if (aMessage.MessageNotificationClass == Message.NotificationClass.HAZA) { this._hazMessage = aMessage; this.ControlMessages.Add(aMessage); }
+ }
+
+ #region HAZ
+
+ if (this._hazMessage == null)
+ {
+ this._hazMessage = this.Core.CreateMessage(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ this.Messages.Add(this._hazMessage);
+ }
+
+ HAZ haz = null;
+ if (this._hazMessage.Elements.Count > 0)
+ haz = this._hazMessage.Elements[0] as HAZ;
+ if (haz == null)
+ {
+ haz = new HAZ();
+ haz.MessageCore = this.Core;
+ haz.MessageHeader = this._hazMessage;
+ _hazMessage.Elements.Add(haz);
+ }
+
+ this.haz = haz;
+ this.groupBoxHAZ.DataContext = haz;
+
+ this.dataGridIMDGItems.Initialize();
+ this.dataGridIMDGItems.ItemsSource = this.haz.IMDGPositions;
+ this.dataGridIMDGItems.CreateRequested += DataGridIMDGItems_CreateRequested;
+ this.dataGridIMDGItems.AddingNewItem += DataGridIMDGItems_AddingNewItem;
+ this.dataGridIMDGItems.EditRequested += DataGridIMDGItems_EditRequested;
+ this.dataGridIMDGItems.DeleteRequested += DataGridIMDGItems_DeleteRequested;
+
+ this.dataGridIBCItems.Initialize();
+ this.dataGridIBCItems.ItemsSource = this.haz.IBCPositions;
+ this.dataGridIBCItems.CreateRequested += DataGridIBCItems_CreateRequested;
+ this.dataGridIBCItems.AddingNewItem += DataGridIBCItems_AddingNewItem;
+ this.dataGridIBCItems.EditRequested += DataGridIBCItems_EditRequested;
+ this.dataGridIBCItems.DeleteRequested += DataGridIBCItems_DeleteRequested;
+
+ this.dataGridIGCItems.Initialize();
+ this.dataGridIGCItems.ItemsSource = this.haz.IGCPositions;
+ this.dataGridIGCItems.CreateRequested += DataGridIGCItems_CreateRequested;
+ this.dataGridIGCItems.AddingNewItem += DataGridIGCItems_AddingNewItem;
+ this.dataGridIGCItems.EditRequested += DataGridIGCItems_EditRequested;
+ this.dataGridIGCItems.DeleteRequested += DataGridIGCItems_DeleteRequested;
+
+ this.dataGridIMSBCItems.Initialize();
+ this.dataGridIMSBCItems.ItemsSource = this.haz.IMSBCPositions;
+ this.dataGridIMSBCItems.CreateRequested += DataGridIMSBCItems_CreateRequested;
+ this.dataGridIMSBCItems.AddingNewItem += DataGridIMSBCItems_AddingNewItem;
+ this.dataGridIMSBCItems.EditRequested += DataGridIMSBCItems_EditRequested;
+ this.dataGridIMSBCItems.DeleteRequested += DataGridIMSBCItems_DeleteRequested;
+
+ this.dataGridMARPOLItems.Initialize();
+ this.dataGridMARPOLItems.ItemsSource = this.haz.MARPOLPositions;
+ this.dataGridMARPOLItems.CreateRequested += DataGridMARPOLItems_CreateRequested;
+ this.dataGridMARPOLItems.AddingNewItem += DataGridMARPOLItems_AddingNewItem;
+ this.dataGridMARPOLItems.EditRequested += DataGridMARPOLItems_EditRequested;
+ this.dataGridMARPOLItems.DeleteRequested += DataGridMARPOLItems_DeleteRequested;
+
+ #endregion
+
+ }
+
+ #region MARPOL datagrid handlers
+
+ private void DataGridMARPOLItems_DeleteRequested(DatabaseEntity obj)
+ {
+ MARPOL_Annex_I_Position marpol = obj as MARPOL_Annex_I_Position;
+ if (marpol != null)
+ {
+ // are you sure dialog is in base class
+ this.haz.MARPOLPositions.Remove(marpol);
+ this.dataGridMARPOLItems.Items.Refresh();
+ }
+ }
+
+ private void DataGridMARPOLItems_EditRequested(DatabaseEntity obj)
+ {
+ MARPOL_Annex_I_Position marpol = obj as MARPOL_Annex_I_Position;
+ if (marpol != null)
+ {
+ EditMarpolDialog eld = new EditMarpolDialog();
+ eld.MARPOL = marpol;
+
+ eld.AddClicked += () =>
+ {
+ eld.CopyValuesToEntity();
+ haz.MARPOLPositions.Add(eld.MARPOL);
+ this.dataGridMARPOLItems.Items.Refresh();
+ eld.MARPOL = new MARPOL_Annex_I_Position();
+ eld.MARPOL.HAZ = this.haz;
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ };
+
+ if (eld.ShowDialog() ?? false)
+ {
+ this.dataGridMARPOLItems.Items.Refresh();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ }
+ }
+ }
+
+ private void DataGridMARPOLItems_AddingNewItem(object sender, System.Windows.Controls.AddingNewItemEventArgs e)
+ {
+ this.DataGridMARPOLItems_CreateRequested();
+ }
+
+ private void DataGridMARPOLItems_CreateRequested()
+ {
+ MARPOL_Annex_I_Position marpol = new MARPOL_Annex_I_Position();
+ EditMarpolDialog ebd = new EditMarpolDialog();
+ ebd.MARPOL = marpol;
+
+ ebd.AddClicked += () =>
+ {
+ ebd.CopyValuesToEntity();
+ this.haz.MARPOLPositions.Add(ebd.MARPOL);
+ ebd.MARPOL.HAZ = this.haz;
+ this.dataGridMARPOLItems.Items.Refresh();
+ ebd.MARPOL = new MARPOL_Annex_I_Position();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ };
+
+ if (ebd.ShowDialog() ?? false)
+ {
+ marpol.HAZ = haz;
+ haz.MARPOLPositions.Add(marpol);
+ this.dataGridMARPOLItems.Items.Refresh();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ }
+ }
+
+ #endregion
+
+ #region IMSBC datagrid handlers
+
+ private void DataGridIMSBCItems_DeleteRequested(DatabaseEntity obj)
+ {
+ IMSBCPosition imsbc = obj as IMSBCPosition;
+ if (imsbc != null)
+ {
+ // are you sure dialog is in base class
+ this.haz.IMSBCPositions.Remove(imsbc);
+ this.dataGridIMSBCItems.Items.Refresh();
+ }
+ }
+
+ private void DataGridIMSBCItems_EditRequested(DatabaseEntity obj)
+ {
+ IMSBCPosition imsbc = obj as IMSBCPosition;
+ if (imsbc != null)
+ {
+ EditIMSBCDialog eld = new EditIMSBCDialog();
+ eld.IMSBC = imsbc;
+
+ eld.AddClicked += () =>
+ {
+ eld.CopyValuesToEntity();
+ haz.IMSBCPositions.Add(eld.IMSBC);
+ this.dataGridIMSBCItems.Items.Refresh();
+ eld.IMSBC = new IMSBCPosition();
+ eld.IMSBC.HAZ = this.haz;
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ };
+
+ if (eld.ShowDialog() ?? false)
+ {
+ this.dataGridIMSBCItems.Items.Refresh();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ }
+ }
+ }
+
+ private void DataGridIMSBCItems_AddingNewItem(object sender, System.Windows.Controls.AddingNewItemEventArgs e)
+ {
+ this.DataGridIMSBCItems_CreateRequested();
+ }
+
+ private void DataGridIMSBCItems_CreateRequested()
+ {
+ IMSBCPosition imsbc = new IMSBCPosition();
+ EditIMSBCDialog ebd = new EditIMSBCDialog();
+ ebd.IMSBC = imsbc;
+
+ ebd.AddClicked += () =>
+ {
+ ebd.CopyValuesToEntity();
+ this.haz.IMSBCPositions.Add(ebd.IMSBC);
+ ebd.IMSBC.HAZ = this.haz;
+ this.dataGridIMSBCItems.Items.Refresh();
+ ebd.IMSBC = new IMSBCPosition();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ };
+
+ if (ebd.ShowDialog() ?? false)
+ {
+ imsbc.HAZ = haz;
+ haz.IMSBCPositions.Add(imsbc);
+ this.dataGridIMSBCItems.Items.Refresh();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ }
+ }
+
+ #endregion
+
+ #region IGC datagrid handlers
+
+ private void DataGridIGCItems_DeleteRequested(DatabaseEntity obj)
+ {
+ IGCPosition igc = obj as IGCPosition;
+ if (igc != null)
+ {
+ // are you sure dialog is in base class
+ this.haz.IGCPositions.Remove(igc);
+ this.dataGridIGCItems.Items.Refresh();
+ }
+ }
+
+ private void DataGridIGCItems_EditRequested(DatabaseEntity obj)
+ {
+ IGCPosition igc = obj as IGCPosition;
+ if (igc != null)
+ {
+ EditIGCDialog eld = new EditIGCDialog();
+ eld.IGC = igc;
+
+ eld.AddClicked += () =>
+ {
+ eld.CopyValuesToEntity();
+ haz.IGCPositions.Add(eld.IGC);
+ this.dataGridIGCItems.Items.Refresh();
+ eld.IGC = new IGCPosition();
+ eld.IGC.HAZ = this.haz;
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ };
+
+ if (eld.ShowDialog() ?? false)
+ {
+ this.dataGridIGCItems.Items.Refresh();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ }
+ }
+ }
+
+ private void DataGridIGCItems_AddingNewItem(object sender, System.Windows.Controls.AddingNewItemEventArgs e)
+ {
+ this.DataGridIGCItems_CreateRequested();
+ }
+
+ private void DataGridIGCItems_CreateRequested()
+ {
+ IGCPosition igc = new IGCPosition();
+ EditIGCDialog ebd = new EditIGCDialog();
+ ebd.IGC = igc;
+
+ ebd.AddClicked += () =>
+ {
+ ebd.CopyValuesToEntity();
+ this.haz.IGCPositions.Add(ebd.IGC);
+ ebd.IGC.HAZ = this.haz;
+ this.dataGridIGCItems.Items.Refresh();
+ ebd.IGC = new IGCPosition();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ };
+
+ if (ebd.ShowDialog() ?? false)
+ {
+ igc.HAZ = haz;
+ haz.IGCPositions.Add(igc);
+ this.dataGridIGCItems.Items.Refresh();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ }
+ }
+
+ #endregion
+
+ #region IBC datagrid handlers
+
+ private void DataGridIBCItems_DeleteRequested(DatabaseEntity obj)
+ {
+ IBCPosition ibc = obj as IBCPosition;
+ if (ibc != null)
+ {
+ // are you sure dialog is in base class
+ this.haz.IBCPositions.Remove(ibc);
+ this.dataGridIBCItems.Items.Refresh();
+ }
+ }
+
+ private void DataGridIBCItems_EditRequested(DatabaseEntity obj)
+ {
+ IBCPosition ibc = obj as IBCPosition;
+ if (ibc != null)
+ {
+ EditIBCDialog eld = new EditIBCDialog();
+ eld.IBC = ibc;
+
+ eld.AddClicked += () =>
+ {
+ eld.CopyValuesToEntity();
+ haz.IBCPositions.Add(eld.IBC);
+ this.dataGridIBCItems.Items.Refresh();
+ eld.IBC = new IBCPosition();
+ eld.IBC.HAZ = this.haz;
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ };
+
+ if (eld.ShowDialog() ?? false)
+ {
+ this.dataGridIBCItems.Items.Refresh();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ }
+ }
+ }
+
+ private void DataGridIBCItems_AddingNewItem(object sender, System.Windows.Controls.AddingNewItemEventArgs e)
+ {
+ this.DataGridIBCItems_CreateRequested();
+ }
+
+ private void DataGridIBCItems_CreateRequested()
+ {
+ IBCPosition ibc = new IBCPosition();
+ EditIBCDialog ebd = new EditIBCDialog();
+ ebd.IBC = ibc;
+
+ ebd.AddClicked += () =>
+ {
+ ebd.CopyValuesToEntity();
+ this.haz.IBCPositions.Add(ebd.IBC);
+ ebd.IBC.HAZ = this.haz;
+ this.dataGridIBCItems.Items.Refresh();
+ ebd.IBC = new IBCPosition();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ };
+
+ if (ebd.ShowDialog() ?? false)
+ {
+ ibc.HAZ = haz;
+ haz.IBCPositions.Add(ibc);
+ this.dataGridIBCItems.Items.Refresh();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ }
+ }
+
+ #endregion
+
+ #region IMDG datagrid handlers
+
+ private void DataGridIMDGItems_DeleteRequested(DatabaseEntity obj)
+ {
+ IMDGPosition imdg = obj as IMDGPosition;
+ if (imdg != null)
+ {
+ // are you sure dialog is in base class
+ this.haz.IMDGPositions.Remove(imdg);
+ this.dataGridIMDGItems.Items.Refresh();
+ }
+ }
+
+ private void DataGridIMDGItems_EditRequested(DatabaseEntity obj)
+ {
+ IMDGPosition imdg = obj as IMDGPosition;
+ if (imdg != null)
+ {
+ EditIMDGDialog eld = new EditIMDGDialog();
+ eld.IMDG = imdg;
+
+ eld.AddClicked += () =>
+ {
+ eld.CopyValuesToEntity();
+ haz.IMDGPositions.Add(eld.IMDG);
+ this.dataGridIMDGItems.Items.Refresh();
+ eld.IMDG = new IMDGPosition();
+ eld.IMDG.HAZ = this.haz;
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ };
+
+ if (eld.ShowDialog() ?? false)
+ {
+ this.dataGridIMDGItems.Items.Refresh();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ }
+ }
+ }
+
+ private void DataGridIMDGItems_AddingNewItem(object sender, System.Windows.Controls.AddingNewItemEventArgs e)
+ {
+ this.DataGridIMDGItems_CreateRequested();
+ }
+
+ private void DataGridIMDGItems_CreateRequested()
+ {
+ IMDGPosition imdg = new IMDGPosition();
+ EditIMDGDialog ebd = new EditIMDGDialog();
+ ebd.IMDG = imdg;
+
+ ebd.AddClicked += () =>
+ {
+ ebd.CopyValuesToEntity();
+ this.haz.IMDGPositions.Add(ebd.IMDG);
+ ebd.IMDG.HAZ = this.haz;
+ this.dataGridIMDGItems.Items.Refresh();
+ ebd.IMDG = new IMDGPosition();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ };
+
+ if (ebd.ShowDialog() ?? false)
+ {
+ imdg.HAZ = haz;
+ haz.IMDGPositions.Add(imdg);
+ this.dataGridIMDGItems.Items.Refresh();
+ this.SublistElementChanged(this.IsDeparture ? Message.NotificationClass.HAZD : Message.NotificationClass.HAZA);
+ }
+ }
+
+ #endregion
+
}
}
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml
index d5a12a3b..f4967ab8 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml
@@ -11,7 +11,7 @@
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="1024">
-
+
@@ -96,7 +96,7 @@
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
-
+
@@ -106,7 +106,7 @@
-
+
@@ -117,16 +117,17 @@
-
-
+
+
+
-
-
-
+
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml.cs
index 860a133a..8e6cc7d4 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml.cs
@@ -64,6 +64,9 @@ namespace ENI2.DetailViewControls
this.dataGridPortOfCallLast30Days.CreateRequested += DataGridPortOfCallLast30Days_CreateRequested;
this.dataGridInfectedAreas.Initialize();
+ this.dataGridInfectedAreas.IsReadOnly = !(mdh.InfectedAreaVisited ?? false);
+ this.checkBoxHasShipVisited.Checked += CheckBoxHasShipVisited_Checked;
+ this.checkBoxHasShipVisited.Unchecked += CheckBoxHasShipVisited_Checked;
this.dataGridInfectedAreas.ItemsSource = mdh.InfectedAreas;
this.dataGridInfectedAreas.AddingNewItem += DataGridInfectedAreas_AddingNewItem;
this.dataGridInfectedAreas.EditRequested += DataGridInfectedAreas_EditRequested;
@@ -71,6 +74,9 @@ namespace ENI2.DetailViewControls
this.dataGridInfectedAreas.CreateRequested += DataGridInfectedAreas_CreateRequested;
this.dataGridSanitaryMeasures.Initialize();
+ this.dataGridSanitaryMeasures.IsReadOnly = !(mdh.SanitaryMeasuresApplied ?? false);
+ this.checkBoxSanitaryMeasuresApplied.Checked += CheckBoxSanitaryMeasuresApplied_Checked;
+ this.checkBoxSanitaryMeasuresApplied.Unchecked += CheckBoxSanitaryMeasuresApplied_Checked;
this.dataGridSanitaryMeasures.ItemsSource = mdh.SanitaryMeasuresDetails;
this.dataGridSanitaryMeasures.AddingNewItem += DataGridSanitaryMeasures_AddingNewItem;
this.dataGridSanitaryMeasures.EditRequested += DataGridSanitaryMeasures_EditRequested;
@@ -81,6 +87,16 @@ namespace ENI2.DetailViewControls
}
+ private void CheckBoxHasShipVisited_Checked(object sender, RoutedEventArgs e)
+ {
+ this.dataGridInfectedAreas.IsReadOnly = !(this.checkBoxHasShipVisited.IsChecked ?? false);
+ }
+
+ private void CheckBoxSanitaryMeasuresApplied_Checked(object sender, RoutedEventArgs e)
+ {
+ this.dataGridSanitaryMeasures.IsReadOnly = !(this.checkBoxSanitaryMeasuresApplied.IsChecked ?? false);
+ }
+
private void MaritimeHealthDeclarationDetailControl_Loaded(object sender, RoutedEventArgs e)
{
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml
index 6d88c1e1..5ac4539c 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml
@@ -28,7 +28,7 @@
-
+
@@ -49,13 +49,13 @@
-
+
-
+
@@ -80,13 +80,13 @@
-
-
+
+
-
-
-
-
+
+
+
+
@@ -102,8 +102,8 @@
-
-
+
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs
index e3cf6e01..c57bd8ee 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs
@@ -7,6 +7,8 @@ using System.Windows.Controls;
using ENI2.EditControls;
using bsmd.database;
+using System.Windows.Data;
+using System;
namespace ENI2.DetailViewControls
{
@@ -67,9 +69,13 @@ namespace ENI2.DetailViewControls
this._sec = sec;
this.comboBoxCurrentShipSecurityLevel.ItemsSource = Util.GlobalStructures.ShipSecurityLevels;
+ this.comboBoxCurrentShipSecurityLevel.KeyUp += ComboBox_KeyUp;
this.comboBoxISSCType.ItemsSource = isscTypes;
+ this.comboBoxISSCType.KeyUp += ComboBox_KeyUp;
this.comboBoxISSCIssuerType.ItemsSource = isscIssuerTypes;
+ this.comboBoxISSCIssuerType.KeyUp += ComboBox_KeyUp;
this.comboBoxGeneralDescriptionOfCargo.ItemsSource = cargoDescriptions;
+ this.comboBoxGeneralDescriptionOfCargo.KeyUp += ComboBox_KeyUp;
this.dataGridLast10PortFacilities.Initialize();
this.dataGridLast10PortFacilities.ItemsSource = sec.LastTenPortFacilitesCalled;
@@ -88,7 +94,7 @@ namespace ENI2.DetailViewControls
#endregion
- }
+ }
#region data grid ship 2 ship activities
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml
index b7e9f6f5..8198fd60 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml
@@ -50,16 +50,16 @@
-
-
-
-
+
+
+
+
-
+
-
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml.cs
index 4a287aaa..d7e0019e 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml.cs
@@ -74,8 +74,11 @@ namespace ENI2.DetailViewControls
}
this.comboBoxFlag.ItemsSource = CREW.NationalityDict;
+ this.comboBoxFlag.KeyUp += ComboBox_KeyUp;
this.comboBoxVesselType.ItemsSource = STAT.VesselTypeDict;
+ this.comboBoxVesselType.KeyUp += ComboBox_KeyUp;
this.comboBoxTransportMode.ItemsSource = STAT.TransportModeDict;
+ this.comboBoxTransportMode.KeyUp += ComboBox_KeyUp;
this.shipDataGroupBox.DataContext = stat;
#endregion
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/WasteDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/WasteDetailControl.xaml
index 08c1bebb..cbb11392 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/WasteDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/WasteDetailControl.xaml
@@ -48,7 +48,7 @@
-
+
diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj
index 8928b6d7..aa397a13 100644
--- a/ENI-2/ENI2/ENI2/ENI2.csproj
+++ b/ENI-2/ENI2/ENI2/ENI2.csproj
@@ -221,6 +221,18 @@
EditCREWDialog.xaml
+
+ EditIBCDialog.xaml
+
+
+ EditIGCDialog.xaml
+
+
+ EditIMDGDialog.xaml
+
+
+ EditIMSBCDialog.xaml
+
EditInfectedAreaDialog.xaml
@@ -230,6 +242,9 @@
EditLast10PortFacilitiesDialog.xaml
+
+ EditMarpolDialog.xaml
+
EditPASDialog.xaml
@@ -355,6 +370,22 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -367,6 +398,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditCREWDialog.xaml b/ENI-2/ENI2/ENI2/EditControls/EditCREWDialog.xaml
index a2f2e86d..595ea77f 100644
--- a/ENI-2/ENI2/ENI2/EditControls/EditCREWDialog.xaml
+++ b/ENI-2/ENI2/ENI2/EditControls/EditCREWDialog.xaml
@@ -38,9 +38,9 @@
-
-
-
+
+
+
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditCREWDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/EditCREWDialog.xaml.cs
index e355937c..a06dc2dd 100644
--- a/ENI-2/ENI2/ENI2/EditControls/EditCREWDialog.xaml.cs
+++ b/ENI-2/ENI2/ENI2/EditControls/EditCREWDialog.xaml.cs
@@ -31,12 +31,15 @@ namespace ENI2.EditControls
this.textBoxLastName.Text = this.CREW.CrewMemberLastName;
this.textBoxFirstName.Text = this.CREW.CrewMemberFirstName;
this.comboBoxGender.ItemsSource = GlobalStructures.GenderList;
+ this.comboBoxGender.KeyUp += ComboBox_KeyUp;
this.comboBoxGender.SelectedIndex = this.CREW.CrewMemberGender.HasValue ? this.CREW.CrewMemberGender.Value : -1;
this.textBoxPlaceOfBirth.Text = this.CREW.CrewMemberPlaceOfBirth;
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
+ this.comboBoxNationality.KeyUp += ComboBox_KeyUp;
this.comboBoxNationality.SelectedValue = this.CREW.CrewMemberNationality;
this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth;
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeList;
+ this.comboBoxIdDocType.KeyUp += ComboBox_KeyUp;
this.comboBoxIdDocType.SelectedIndex = this.CREW.CrewMemberIdentityDocumentType.HasValue ? this.CREW.CrewMemberIdentityDocumentType.Value : -1;
this.textBoxIdDocNumber.Text = this.CREW.CrewMemberIdentityDocumentId;
this.textBoxVisaNumber.Text = this.CREW.CrewMemberVisaNumber;
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditIBCDialog.xaml b/ENI-2/ENI2/ENI2/EditControls/EditIBCDialog.xaml
new file mode 100644
index 00000000..fef41da6
--- /dev/null
+++ b/ENI-2/ENI2/ENI2/EditControls/EditIBCDialog.xaml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditIBCDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/EditIBCDialog.xaml.cs
new file mode 100644
index 00000000..a02aaa57
--- /dev/null
+++ b/ENI-2/ENI2/ENI2/EditControls/EditIBCDialog.xaml.cs
@@ -0,0 +1,79 @@
+// Copyright (c) 2017 schick Informatik
+// Description: IBC item Bearbeitungsdialog
+//
+
+using System.Windows;
+
+using bsmd.database;
+using ENI2.Controls;
+using ENI2.Util;
+
+namespace ENI2.EditControls
+{
+ ///
+ /// Interaction logic for EditIBCDialog.xaml
+ ///
+ public partial class EditIBCDialog : EditWindowBase
+ {
+ public EditIBCDialog()
+ {
+ InitializeComponent();
+ Loaded += EditIBCDialog_Loaded;
+ AddClicked += () => { this.textBoxIdentifier.Focus(); };
+ }
+
+ public IBCPosition IBC { get; set; }
+
+ private void EditIBCDialog_Loaded(object sender, RoutedEventArgs e)
+ {
+ this.textBoxFlashpoint.Text = this.IBC.Flashpoint_CEL;
+ this.textBoxIdentifier.Text = this.IBC.Identifier;
+ this.textBoxProductName.Text = this.IBC.ProductName;
+ this.textBoxRemarks.Text = this.IBC.Remarks;
+ this.textBoxStowagePosition.Text = this.IBC.StowagePosition;
+
+ this.checkBoxSpecRef15_19.IsChecked = this.IBC.SpecRef15_19;
+
+ this.comboBoxFlashpointInformation.ItemsSource = GlobalStructures.flashpointInformations;
+ this.comboBoxFlashpointInformation.SelectedIndex = this.IBC.FlashpointInformation ?? -1;
+ this.comboBoxPollutionCategory.ItemsSource = GlobalStructures.pollutionCategories;
+ this.comboBoxPollutionCategory.SelectedIndex = this.IBC.PollutionCategory ?? -1;
+ this.comboBoxRisks.ItemsSource = GlobalStructures.hazards;
+ this.comboBoxRisks.SelectedIndex = this.IBC.Hazards ?? -1;
+
+ this.doubleUpDownQuantity.Value = this.IBC.Quantity_KGM;
+
+ this.locodePortOfDischarge.LocodeValue = this.IBC.PortOfDischarge;
+ this.locodePortOfLoading.LocodeValue = this.IBC.PortOfLoading;
+
+
+ this.OKClicked += EditIBCDialog_OKClicked;
+ this.AddVisible = true;
+ }
+
+ public void CopyValuesToEntity()
+ {
+ this.IBC.Flashpoint_CEL = this.textBoxFlashpoint.Text.Trim();
+ this.IBC.Identifier = this.textBoxIdentifier.Text.Trim();
+ this.IBC.ProductName = this.textBoxProductName.Text.Trim();
+ this.IBC.Remarks = this.textBoxRemarks.Text.Trim();
+ this.IBC.StowagePosition = this.textBoxStowagePosition.Text.Trim();
+
+ this.IBC.SpecRef15_19 = this.checkBoxSpecRef15_19.IsChecked;
+
+ this.IBC.FlashpointInformation = (this.comboBoxFlashpointInformation.SelectedIndex == -1) ? null : ((byte?)this.comboBoxFlashpointInformation.SelectedIndex);
+ this.IBC.PollutionCategory = (this.comboBoxPollutionCategory.SelectedIndex == -1) ? null : ((byte?)this.comboBoxPollutionCategory.SelectedIndex);
+ this.IBC.Hazards = (this.comboBoxRisks.SelectedIndex == -1) ? null : ((byte?)this.comboBoxRisks.SelectedIndex);
+
+ this.IBC.Quantity_KGM = this.doubleUpDownQuantity.Value;
+
+ this.IBC.PortOfDischarge = this.locodePortOfDischarge.LocodeValue;
+ this.IBC.PortOfLoading = this.locodePortOfLoading.LocodeValue;
+ }
+
+ private void EditIBCDialog_OKClicked()
+ {
+ this.CopyValuesToEntity();
+ }
+ }
+}
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditIGCDialog.xaml b/ENI-2/ENI2/ENI2/EditControls/EditIGCDialog.xaml
new file mode 100644
index 00000000..cdfe1c1f
--- /dev/null
+++ b/ENI-2/ENI2/ENI2/EditControls/EditIGCDialog.xaml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditIGCDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/EditIGCDialog.xaml.cs
new file mode 100644
index 00000000..d063d1bb
--- /dev/null
+++ b/ENI-2/ENI2/ENI2/EditControls/EditIGCDialog.xaml.cs
@@ -0,0 +1,65 @@
+// Copyright (c) 2017 schick Informatik
+// Description: IGC item Bearbeitungsdialog
+//
+
+using System.Windows;
+
+using bsmd.database;
+using ENI2.Controls;
+using ENI2.Util;
+
+namespace ENI2.EditControls
+{
+ ///
+ /// Interaction logic for EditIGCDialog.xaml
+ ///
+ public partial class EditIGCDialog : EditWindowBase
+ {
+ public EditIGCDialog()
+ {
+ InitializeComponent();
+ Loaded += EditIGCDialog_Loaded;
+ AddClicked += () => { this.textBoxIdentifier.Focus(); };
+ }
+
+ public IGCPosition IGC { get; set; }
+
+ private void EditIGCDialog_Loaded(object sender, RoutedEventArgs e)
+ {
+ this.textBoxIdentifier.Text = this.IGC.Identifier;
+ this.textBoxIMOClass.Text = this.IGC.IMOClass;
+ this.textBoxProductName.Text = this.IGC.ProductName;
+ this.textBoxRemarks.Text = this.IGC.Remarks;
+ this.textBoxStowagePosition.Text = this.IGC.StowagePosition;
+ this.textBoxUNNumber.Text = this.IGC.UNNumber;
+
+ this.doubleUpDownQuantity.Value = this.IGC.Quantity_KGM;
+
+ this.locodePortOfDischarge.LocodeValue = this.IGC.PortOfDischarge;
+ this.locodePortOfLoading.LocodeValue = this.IGC.PortOfLoading;
+
+ this.OKClicked += EditIGCDialog_OKClicked;
+ this.AddVisible = true;
+ }
+
+ public void CopyValuesToEntity()
+ {
+ this.IGC.Identifier = this.textBoxIdentifier.Text.Trim();
+ this.IGC.IMOClass = this.textBoxIMOClass.Text.Trim();
+ this.IGC.ProductName = this.textBoxProductName.Text.Trim();
+ this.IGC.Remarks = this.textBoxRemarks.Text.Trim();
+ this.IGC.StowagePosition = this.textBoxStowagePosition.Text.Trim();
+ this.IGC.UNNumber = this.textBoxUNNumber.Text.Trim();
+
+ this.IGC.Quantity_KGM = this.doubleUpDownQuantity.Value;
+
+ this.IGC.PortOfLoading = this.locodePortOfLoading.LocodeValue;
+ this.IGC.PortOfDischarge = this.locodePortOfDischarge.LocodeValue;
+ }
+
+ private void EditIGCDialog_OKClicked()
+ {
+ this.CopyValuesToEntity();
+ }
+ }
+}
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditIMDGDialog.xaml b/ENI-2/ENI2/ENI2/EditControls/EditIMDGDialog.xaml
new file mode 100644
index 00000000..8a83ff6c
--- /dev/null
+++ b/ENI-2/ENI2/ENI2/EditControls/EditIMDGDialog.xaml
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditIMDGDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/EditIMDGDialog.xaml.cs
new file mode 100644
index 00000000..1380130d
--- /dev/null
+++ b/ENI-2/ENI2/ENI2/EditControls/EditIMDGDialog.xaml.cs
@@ -0,0 +1,122 @@
+// Copyright (c) 2017 schick Informatik
+// Description: IMDG item Bearbeitungsdialog
+//
+
+using System.Windows;
+
+using bsmd.database;
+using ENI2.Controls;
+using ENI2.Util;
+
+namespace ENI2.EditControls
+{
+ ///
+ /// Interaction logic for EditIMDGDialog.xaml
+ ///
+ public partial class EditIMDGDialog : EditWindowBase
+ {
+ public EditIMDGDialog()
+ {
+ InitializeComponent();
+ Loaded += EditIMDGDialog_Loaded;
+ AddClicked += () => { this.textBoxIdentifier.Focus(); };
+ }
+
+ public IMDGPosition IMDG { get; set; }
+
+ private void EditIMDGDialog_Loaded(object sender, RoutedEventArgs e)
+ {
+ this.textBoxClass7NuclideName.Text = this.IMDG.Class7NuclideName;
+ this.textBoxContainerNo.Text = this.IMDG.ContainerNumber;
+ this.textBoxContainerPositionBay.Text = this.IMDG.Bay;
+ this.textBoxContainerPositionRow.Text = this.IMDG.Row;
+ this.textBoxContainerPositionTier.Text = this.IMDG.Tier;
+ this.textBoxFlashpoint.Text = this.IMDG.Flashpoint_CEL;
+ this.textBoxIdentifier.Text = this.IMDG.Identifier;
+ this.textBoxIMOClass.Text = this.IMDG.IMOClass;
+ this.textBoxPackageType.Text = this.IMDG.PackageType;
+ this.textBoxProperShippingName.Text = this.IMDG.ProperShippingName;
+ this.textBoxRemarks.Text = this.IMDG.Remarks;
+ this.textBoxStowagePosition.Text = this.IMDG.StowagePosition;
+ this.textBoxSubsidiaryRisks.Text = this.IMDG.SubsidiaryRiskText;
+ this.textBoxTechnicalName.Text = this.IMDG.TechnicalName;
+ this.textBoxUNNumber.Text = this.IMDG.UNNumber;
+ this.textBoxVehicleLicensePlate.Text = this.IMDG.VehicleLicenseNumber;
+
+ this.decimalUpdownClass7TransportIndex.Value = this.IMDG.Class7TransportIndex;
+ this.decimalUpdownControlTemperature.Value = this.IMDG.ControlTemperature_CEL;
+ this.decimalUpDownCSI.Value = this.IMDG.Class7CSI;
+ this.decimalUpDownEmergencyTemperature.Value = this.IMDG.EmergencyTemperature_CEL;
+ this.decimalUpDownGrossQuantity.Value = this.IMDG.GrossQuantity_KGM;
+ this.decimalUpDownMaxActivity.Value = this.IMDG.Class7MaxActivity_BQL;
+ this.decimalUpDownNetExplosiveMass.Value = this.IMDG.NetExplosiveMass_KGM;
+ this.decimalUpDownNetQuantity.Value = this.IMDG.NetQuantity_KGM;
+
+ this.integerUpDownCategory.Value = this.IMDG.Class7Category;
+ this.integerUpDownNumberOfPackages.Value = this.IMDG.NumberOfPackages;
+
+ this.checkBoxExceptedQuantities.IsChecked = this.IMDG.ExceptedQuantities;
+ this.checkBoxGeneralCargo.IsChecked = this.IMDG.GeneralCargoIBC;
+ this.checkBoxLimitedQuantities.IsChecked = this.IMDG.LimitedQuantities;
+ this.checkBoxMarinePollutant.IsChecked = this.IMDG.MarinePollutant;
+
+ this.comboBoxPackingGroup.ItemsSource = GlobalStructures.packingGroups;
+ this.comboBoxPackingGroup.SelectedIndex = (int) (this.IMDG.PackingGroup ?? -1);
+
+ this.locodeControlPortOfDischarge.LocodeValue = this.IMDG.PortOfDischarge;
+ this.locodeControlPortOfLoading.LocodeValue = this.IMDG.PortOfLoading;
+
+ this.OKClicked += EditIMDGDialog_OKClicked; ;
+ this.AddVisible = true;
+ }
+
+ public void CopyValuesToEntity()
+ {
+
+ this.IMDG.Class7NuclideName = this.textBoxClass7NuclideName.Text.Trim();
+ this.IMDG.ContainerNumber = this.textBoxContainerNo.Text.Trim();
+ this.IMDG.Bay = this.textBoxContainerPositionBay.Text.Trim();
+ this.IMDG.Row = this.textBoxContainerPositionRow.Text.Trim();
+ this.IMDG.Tier = this.textBoxContainerPositionTier.Text.Trim();
+ this.IMDG.Flashpoint_CEL = this.textBoxFlashpoint.Text.Trim();
+ this.IMDG.Identifier = this.textBoxIdentifier.Text.Trim();
+ this.IMDG.IMOClass = this.textBoxIMOClass.Text.Trim();
+ this.IMDG.PackageType = this.textBoxPackageType.Text.Trim();
+ this.IMDG.ProperShippingName = this.textBoxProperShippingName.Text.Trim();
+ this.IMDG.Remarks = this.textBoxRemarks.Text.Trim();
+ this.IMDG.StowagePosition = this.textBoxStowagePosition.Text.Trim();
+ this.IMDG.SubsidiaryRiskText = this.textBoxSubsidiaryRisks.Text.Trim();
+ this.IMDG.TechnicalName = this.textBoxTechnicalName.Text.Trim();
+ this.IMDG.UNNumber = this.textBoxUNNumber.Text.Trim();
+ this.IMDG.VehicleLicenseNumber = this.textBoxVehicleLicensePlate.Text.Trim();
+
+ this.IMDG.Class7TransportIndex = this.decimalUpdownClass7TransportIndex.Value;
+ this.IMDG.ControlTemperature_CEL = this.decimalUpdownControlTemperature.Value;
+ this.IMDG.Class7CSI = (int?) this.decimalUpDownCSI.Value;
+ this.IMDG.EmergencyTemperature_CEL = this.decimalUpDownEmergencyTemperature.Value;
+ this.IMDG.GrossQuantity_KGM = this.decimalUpDownGrossQuantity.Value;
+ this.IMDG.Class7MaxActivity_BQL = this.decimalUpDownMaxActivity.Value;
+ this.IMDG.NetExplosiveMass_KGM = this.decimalUpDownNetExplosiveMass.Value;
+ this.IMDG.NetQuantity_KGM = this.decimalUpDownNetQuantity.Value;
+
+ this.IMDG.Class7Category = this.integerUpDownCategory.Value;
+ this.IMDG.NumberOfPackages = this.integerUpDownNumberOfPackages.Value;
+
+ this.IMDG.ExceptedQuantities = this.checkBoxExceptedQuantities.IsChecked;
+ this.IMDG.GeneralCargoIBC = this.checkBoxGeneralCargo.IsChecked;
+ this.IMDG.LimitedQuantities = this.checkBoxLimitedQuantities.IsChecked;
+ this.IMDG.MarinePollutant = this.checkBoxMarinePollutant.IsChecked;
+
+ this.IMDG.PackingGroup = (this.comboBoxPackingGroup.SelectedIndex == -1) ? null : ((byte?)this.comboBoxPackingGroup.SelectedIndex);
+
+ this.IMDG.PortOfDischarge = this.locodeControlPortOfDischarge.LocodeValue;
+ this.IMDG.PortOfLoading = this.locodeControlPortOfLoading.LocodeValue;
+
+ }
+
+ private void EditIMDGDialog_OKClicked()
+ {
+ this.CopyValuesToEntity();
+ }
+ }
+}
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditIMSBCDialog.xaml b/ENI-2/ENI2/ENI2/EditControls/EditIMSBCDialog.xaml
new file mode 100644
index 00000000..9ed1b9cb
--- /dev/null
+++ b/ENI-2/ENI2/ENI2/EditControls/EditIMSBCDialog.xaml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditIMSBCDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/EditIMSBCDialog.xaml.cs
new file mode 100644
index 00000000..5e486549
--- /dev/null
+++ b/ENI-2/ENI2/ENI2/EditControls/EditIMSBCDialog.xaml.cs
@@ -0,0 +1,68 @@
+// Copyright (c) 2017 schick Informatik
+// Description: IMSBC item Bearbeitungsdialog
+//
+
+using System.Windows;
+
+using bsmd.database;
+using ENI2.Controls;
+using ENI2.Util;
+
+namespace ENI2.EditControls
+{
+ ///
+ /// Interaction logic for EditIMSBCDialog.xaml
+ ///
+ public partial class EditIMSBCDialog : EditWindowBase
+ {
+ public EditIMSBCDialog()
+ {
+ InitializeComponent();
+ Loaded += EditIMSBCDialog_Loaded;
+ AddClicked += () => { this.textBoxIdentifier.Focus(); };
+ }
+
+ public IMSBCPosition IMSBC { get; set; }
+
+ private void EditIMSBCDialog_Loaded(object sender, RoutedEventArgs e)
+ {
+ this.textBoxBulkCargoShippingName.Text = this.IMSBC.BulkCargoShippingName;
+ this.textBoxIdentifier.Text = this.IMSBC.Identifier;
+ this.textBoxIMOClass.Text = this.IMSBC.IMOClass;
+ this.textBoxRemarks.Text = this.IMSBC.Remarks;
+ this.textBoxStowagePosition.Text = this.IMSBC.StowagePosition;
+ this.textBoxUNNumber.Text = this.IMSBC.UNNumber;
+
+ this.checkBoxMaterialHazardous.IsChecked = this.IMSBC.MHB;
+
+ this.doubleUpDownQuantity.Value = this.IMSBC.Quantity_KGM;
+
+ this.locodePortOfDischarge.LocodeValue = this.IMSBC.PortOfDischarge;
+ this.locodePortOfLoading.LocodeValue = this.IMSBC.PortOfLoading;
+
+ this.OKClicked += EditIMSBCDialog_OKClicked;
+ this.AddVisible = true;
+ }
+
+ public void CopyValuesToEntity()
+ {
+ this.IMSBC.BulkCargoShippingName = this.textBoxBulkCargoShippingName.Text.Trim();
+ this.IMSBC.Identifier = this.textBoxIdentifier.Text.Trim();
+ this.IMSBC.IMOClass = this.textBoxIMOClass.Text.Trim();
+ this.IMSBC.Remarks = this.textBoxRemarks.Text.Trim();
+ this.IMSBC.StowagePosition = this.textBoxStowagePosition.Text.Trim();
+ this.IMSBC.UNNumber = this.textBoxUNNumber.Text.Trim();
+
+ this.IMSBC.MHB = this.checkBoxMaterialHazardous.IsChecked;
+ this.IMSBC.Quantity_KGM = this.doubleUpDownQuantity.Value;
+ this.IMSBC.PortOfDischarge = this.locodePortOfDischarge.LocodeValue;
+ this.IMSBC.PortOfLoading = this.locodePortOfLoading.LocodeValue;
+ }
+
+ private void EditIMSBCDialog_OKClicked()
+ {
+ this.CopyValuesToEntity();
+ }
+
+ }
+}
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditMarpolDialog.xaml b/ENI-2/ENI2/ENI2/EditControls/EditMarpolDialog.xaml
new file mode 100644
index 00000000..601a40bb
--- /dev/null
+++ b/ENI-2/ENI2/ENI2/EditControls/EditMarpolDialog.xaml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditMarpolDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/EditMarpolDialog.xaml.cs
new file mode 100644
index 00000000..c24d32cc
--- /dev/null
+++ b/ENI-2/ENI2/ENI2/EditControls/EditMarpolDialog.xaml.cs
@@ -0,0 +1,63 @@
+// Copyright (c) 2017 schick Informatik
+// Description: Marpol Annex I item Bearbeitungsdialog
+//
+
+using System.Windows;
+
+using bsmd.database;
+using ENI2.Controls;
+using ENI2.Util;
+
+namespace ENI2.EditControls
+{
+ ///
+ /// Interaction logic for EditMarpolDialog.xaml
+ ///
+ public partial class EditMarpolDialog : EditWindowBase
+ {
+ public EditMarpolDialog()
+ {
+ InitializeComponent();
+ AddClicked += () => { this.textBoxIdentifier.Focus(); };
+ Loaded += EditMarpolDialog_Loaded;
+ }
+
+ public MARPOL_Annex_I_Position MARPOL { get; set; }
+
+ private void EditMarpolDialog_Loaded(object sender, RoutedEventArgs e)
+ {
+ this.textBoxFlashpoint.Text = this.MARPOL.Flashpoint_CEL;
+ this.textBoxIdentifier.Text = this.MARPOL.Identifier;
+ this.textBoxName.Text = this.MARPOL.Name;
+ this.textBoxRemarks.Text = this.MARPOL.Remarks;
+ this.textBoxStowagePosition.Text = this.MARPOL.StowagePosition;
+
+ this.comboBoxFlashpointInformation.ItemsSource = GlobalStructures.flashpointInformations;
+ this.comboBoxFlashpointInformation.SelectedIndex = (this.MARPOL.FlashpointInformation == null) ? -1 : ((int)this.MARPOL.FlashpointInformation);
+ this.doubleUpDownQuantity.Value = this.MARPOL.Quantity_KGM;
+ this.locodeControlPortOfDischarge.LocodeValue = this.MARPOL.PortOfDischarge;
+ this.locodeControlPortOfLoading.LocodeValue = this.MARPOL.PortOfLoading;
+
+ this.AddVisible = true;
+ this.OKClicked += EditMarpolDialog_OKClicked;
+ }
+
+ public void CopyValuesToEntity()
+ {
+ this.MARPOL.Flashpoint_CEL = this.textBoxFlashpoint.Text.Trim();
+ this.MARPOL.Identifier = this.textBoxIdentifier.Text.Trim();
+ this.MARPOL.Name = this.textBoxName.Text.Trim();
+ this.MARPOL.Remarks = this.textBoxRemarks.Text.Trim();
+ this.MARPOL.StowagePosition = this.textBoxStowagePosition.Text.Trim();
+ this.MARPOL.FlashpointInformation = (this.comboBoxFlashpointInformation.SelectedIndex == -1) ? null : ((byte?)this.comboBoxFlashpointInformation.SelectedIndex);
+ this.MARPOL.Quantity_KGM = this.doubleUpDownQuantity.Value;
+ this.MARPOL.PortOfDischarge = this.locodeControlPortOfDischarge.LocodeValue;
+ this.MARPOL.PortOfLoading = this.locodeControlPortOfLoading.LocodeValue;
+ }
+
+ private void EditMarpolDialog_OKClicked()
+ {
+ this.CopyValuesToEntity();
+ }
+ }
+}
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditPasDialog.xaml b/ENI-2/ENI2/ENI2/EditControls/EditPasDialog.xaml
index dba8d3c6..6f742f25 100644
--- a/ENI-2/ENI2/ENI2/EditControls/EditPasDialog.xaml
+++ b/ENI-2/ENI2/ENI2/EditControls/EditPasDialog.xaml
@@ -39,11 +39,11 @@
-
+
-
+
-
+
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditPasDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/EditPasDialog.xaml.cs
index 69b3e275..68a33fa8 100644
--- a/ENI-2/ENI2/ENI2/EditControls/EditPasDialog.xaml.cs
+++ b/ENI-2/ENI2/ENI2/EditControls/EditPasDialog.xaml.cs
@@ -30,12 +30,15 @@ namespace ENI2.EditControls
this.textBoxLastName.Text = this.PAS.PassengerLastName;
this.textBoxFirstName.Text = this.PAS.PassengerFirstName;
this.comboBoxGender.ItemsSource = GlobalStructures.GenderList;
+ this.comboBoxGender.KeyUp += ComboBox_KeyUp;
this.comboBoxGender.SelectedIndex = this.PAS.PassengerGender.HasValue ? this.PAS.PassengerGender.Value : -1;
this.textBoxPlaceOfBirth.Text = this.PAS.PassengerPlaceOfBirth;
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
+ this.comboBoxNationality.KeyUp += ComboBox_KeyUp;
this.comboBoxNationality.SelectedValue = this.PAS.PassengerNationality;
this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth;
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeList;
+ this.comboBoxIdDocType.KeyUp += ComboBox_KeyUp;
this.comboBoxIdDocType.SelectedIndex = this.PAS.PassengerIdentityDocumentType.HasValue ? this.PAS.PassengerIdentityDocumentType.Value : -1;
this.textBoxIdDocNumber.Text = this.PAS.PassengerIdentityDocumentId;
this.textBoxVisaNumber.Text = this.PAS.PassengerVisaNumber;
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditShip2ShipActivitiesDialog.xaml b/ENI-2/ENI2/ENI2/EditControls/EditShip2ShipActivitiesDialog.xaml
index ab95e362..e2c16cfb 100644
--- a/ENI-2/ENI2/ENI2/EditControls/EditShip2ShipActivitiesDialog.xaml
+++ b/ENI-2/ENI2/ENI2/EditControls/EditShip2ShipActivitiesDialog.xaml
@@ -36,8 +36,8 @@
-
-
+
+
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditTOWDialog.xaml b/ENI-2/ENI2/ENI2/EditControls/EditTOWDialog.xaml
index ecfe1542..8c966df0 100644
--- a/ENI-2/ENI2/ENI2/EditControls/EditTOWDialog.xaml
+++ b/ENI-2/ENI2/ENI2/EditControls/EditTOWDialog.xaml
@@ -25,39 +25,45 @@
+
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -65,8 +71,8 @@
-
-
+
+
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditTOWDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/EditTOWDialog.xaml.cs
index 86e386de..50f3d142 100644
--- a/ENI-2/ENI2/ENI2/EditControls/EditTOWDialog.xaml.cs
+++ b/ENI-2/ENI2/ENI2/EditControls/EditTOWDialog.xaml.cs
@@ -50,6 +50,7 @@ namespace ENI2.EditControls
this.textBoxRemarks.Text = this.IsDeparture ? this.TOWD.TowageOnDepartureRemarks : this.TOWA.TowageOnArrivalRemarks;
this.comboBoxFlag.ItemsSource = bsmd.database.CREW.NationalityDict;
this.comboBoxFlag.SelectedValue = this.IsDeparture ? this.TOWD.TowageOnDepartureFlag : this.TOWA.TowageOnArrivalFlag;
+ this.comboBoxFlag.KeyUp += ComboBox_KeyUp;
this.doubleUpDownBeam.Value = this.IsDeparture ? this.TOWD.TowageOnDepartureBeam_MTR : this.TOWA.TowageOnArrivalBeam_MTR;
this.textBoxOperatorName.Text = this.IsDeparture ? this.TOWD.TowageOnDepartureOperatorCompanyName : this.TOWA.TowageOnArrivalOperatorCompanyName;
diff --git a/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs b/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
index e4192837..c4e1bc18 100644
--- a/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
+++ b/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
@@ -671,6 +671,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Bulk cargo shipping name.
+ ///
+ public static string textBulkCargoShippingName {
+ get {
+ return ResourceManager.GetString("textBulkCargoShippingName", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Bunker on arrival.
///
@@ -824,6 +833,24 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Cargo volume.
+ ///
+ public static string textCargoVolume {
+ get {
+ return ResourceManager.GetString("textCargoVolume", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Category.
+ ///
+ public static string textCategory {
+ get {
+ return ResourceManager.GetString("textCategory", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Changed.
///
@@ -878,6 +905,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Columns "o" of OBC Code (value 15.19).
+ ///
+ public static string textColumsOfIBC {
+ get {
+ return ResourceManager.GetString("textColumsOfIBC", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Comment.
///
@@ -932,6 +968,51 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Container No..
+ ///
+ public static string textContainerNo {
+ get {
+ return ResourceManager.GetString("textContainerNo", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Container position (Bay).
+ ///
+ public static string textContainerPositionBay {
+ get {
+ return ResourceManager.GetString("textContainerPositionBay", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Container position (Row).
+ ///
+ public static string textContainerPositionRow {
+ get {
+ return ResourceManager.GetString("textContainerPositionRow", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Container position (Tier).
+ ///
+ public static string textContainerPositionTier {
+ get {
+ return ResourceManager.GetString("textContainerPositionTier", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Control temperature.
+ ///
+ public static string textControlTemperature {
+ get {
+ return ResourceManager.GetString("textControlTemperature", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Copy data.
///
@@ -1022,6 +1103,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Critical safety index (CSI).
+ ///
+ public static string textCriticalSafetyIndex {
+ get {
+ return ResourceManager.GetString("textCriticalSafetyIndex", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Cruise ship.
///
@@ -1049,6 +1139,33 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Dangerous goods arrival.
+ ///
+ public static string textDangerousGoodsArrival {
+ get {
+ return ResourceManager.GetString("textDangerousGoodsArrival", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Dangerous goods departure.
+ ///
+ public static string textDangerousGoodsDeparture {
+ get {
+ return ResourceManager.GetString("textDangerousGoodsDeparture", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Dangerous goods on board.
+ ///
+ public static string textDangerousGoodsOnBoard {
+ get {
+ return ResourceManager.GetString("textDangerousGoodsOnBoard", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Date from.
///
@@ -1157,6 +1274,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to DG manifest on board.
+ ///
+ public static string textDGManifestOnBoard {
+ get {
+ return ResourceManager.GetString("textDGManifestOnBoard", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Discharge.
///
@@ -1247,6 +1373,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Emergency temperature.
+ ///
+ public static string textEmergencyTemperature {
+ get {
+ return ResourceManager.GetString("textEmergencyTemperature", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Empty.
///
@@ -1328,6 +1463,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Excepted quantities.
+ ///
+ public static string textExceptedQuantities {
+ get {
+ return ResourceManager.GetString("textExceptedQuantities", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Exit.
///
@@ -1382,6 +1526,24 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Flashpoint.
+ ///
+ public static string textFlashpoint {
+ get {
+ return ResourceManager.GetString("textFlashpoint", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Flashpoint information.
+ ///
+ public static string textFlashpointInformation {
+ get {
+ return ResourceManager.GetString("textFlashpointInformation", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Full.
///
@@ -1409,6 +1571,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to General cargo.
+ ///
+ public static string textGeneralCargo {
+ get {
+ return ResourceManager.GetString("textGeneralCargo", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to General cargo description.
///
@@ -1427,6 +1598,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Gross quantity.
+ ///
+ public static string textGrossQuantity {
+ get {
+ return ResourceManager.GetString("textGrossQuantity", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Gross tonnage.
///
@@ -1454,6 +1634,24 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to IBC item.
+ ///
+ public static string textIBCItem {
+ get {
+ return ResourceManager.GetString("textIBCItem", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to IBC items.
+ ///
+ public static string textIBCItems {
+ get {
+ return ResourceManager.GetString("textIBCItems", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to ID doc. number.
///
@@ -1472,6 +1670,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Identifier.
+ ///
+ public static string textIdentifier {
+ get {
+ return ResourceManager.GetString("textIdentifier", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Identity card.
///
@@ -1481,6 +1688,42 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to IGC item.
+ ///
+ public static string textIGCItem {
+ get {
+ return ResourceManager.GetString("textIGCItem", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to IGC items.
+ ///
+ public static string textIGCItems {
+ get {
+ return ResourceManager.GetString("textIGCItems", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to IMDG item.
+ ///
+ public static string textIMDGItem {
+ get {
+ return ResourceManager.GetString("textIMDGItem", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to IMDG items.
+ ///
+ public static string textIMDGItems {
+ get {
+ return ResourceManager.GetString("textIMDGItems", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to IMO number.
///
@@ -1490,6 +1733,42 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to IMO class / division / (compatibility group).
+ ///
+ public static string textIMOClassDivision {
+ get {
+ return ResourceManager.GetString("textIMOClassDivision", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to IMO class / subclass.
+ ///
+ public static string textIMOClassSubclass {
+ get {
+ return ResourceManager.GetString("textIMOClassSubclass", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to IMSBC item.
+ ///
+ public static string textIMSBCItem {
+ get {
+ return ResourceManager.GetString("textIMSBCItem", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to IMSBC items.
+ ///
+ public static string textIMSBCItems {
+ get {
+ return ResourceManager.GetString("textIMSBCItems", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Incoming journey to port of call - ETA NOK.
///
@@ -1760,6 +2039,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Limited quantity.
+ ///
+ public static string textLimitedQuantity {
+ get {
+ return ResourceManager.GetString("textLimitedQuantity", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Loading.
///
@@ -1868,6 +2156,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Marine pollutant.
+ ///
+ public static string textMarinePollutant {
+ get {
+ return ResourceManager.GetString("textMarinePollutant", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Maritime health declaration.
///
@@ -1877,6 +2174,24 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to MARPOL Annex I item.
+ ///
+ public static string textMARPOLItem {
+ get {
+ return ResourceManager.GetString("textMARPOLItem", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to MARPOL Annex I items.
+ ///
+ public static string textMARPOLItems {
+ get {
+ return ResourceManager.GetString("textMARPOLItems", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Master.
///
@@ -1886,6 +2201,24 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Material hazardous only in bulk.
+ ///
+ public static string textMaterialHazard {
+ get {
+ return ResourceManager.GetString("textMaterialHazard", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Max acitivity.
+ ///
+ public static string textMaxActivity {
+ get {
+ return ResourceManager.GetString("textMaxActivity", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Maritime health declaration.
///
@@ -1913,6 +2246,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to MoU Baltic RoRo vessel.
+ ///
+ public static string textMoUBalticRoRo {
+ get {
+ return ResourceManager.GetString("textMoUBalticRoRo", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Muster book.
///
@@ -1949,6 +2291,24 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Net explosive mass.
+ ///
+ public static string textNetExplosiveMass {
+ get {
+ return ResourceManager.GetString("textNetExplosiveMass", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Net quantity.
+ ///
+ public static string textNetQuantity {
+ get {
+ return ResourceManager.GetString("textNetQuantity", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Create new id.
///
@@ -2003,6 +2363,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Number of packages.
+ ///
+ public static string textNumberOfPackages {
+ get {
+ return ResourceManager.GetString("textNumberOfPackages", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Operations.
///
@@ -2057,6 +2426,24 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Package type.
+ ///
+ public static string textPackageType {
+ get {
+ return ResourceManager.GetString("textPackageType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Packing group.
+ ///
+ public static string textPackingGroup {
+ get {
+ return ResourceManager.GetString("textPackingGroup", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Passenger.
///
@@ -2192,6 +2579,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Pollution category.
+ ///
+ public static string textPollutionCategory {
+ get {
+ return ResourceManager.GetString("textPollutionCategory", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Port area.
///
@@ -2264,6 +2660,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Port of discharge.
+ ///
+ public static string textPortOfDischarge {
+ get {
+ return ResourceManager.GetString("textPortOfDischarge", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Port of disembarkation.
///
@@ -2300,6 +2705,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Port of loading.
+ ///
+ public static string textPortOfLoading {
+ get {
+ return ResourceManager.GetString("textPortOfLoading", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Port of registry.
///
@@ -2354,6 +2768,24 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Product name.
+ ///
+ public static string textProductName {
+ get {
+ return ResourceManager.GetString("textProductName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Proper shipping name.
+ ///
+ public static string textProperShippingName {
+ get {
+ return ResourceManager.GetString("textProperShippingName", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to PSC 72h.
///
@@ -2372,6 +2804,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Quantity.
+ ///
+ public static string textQuantity {
+ get {
+ return ResourceManager.GetString("textQuantity", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Check status.
///
@@ -2399,6 +2840,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Radionuclide name.
+ ///
+ public static string textRadioNuclideName {
+ get {
+ return ResourceManager.GetString("textRadioNuclideName", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Reason for invalid ISSC.
///
@@ -2462,6 +2912,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Risks.
+ ///
+ public static string textRisks {
+ get {
+ return ResourceManager.GetString("textRisks", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Sanitary control exemption or certificate on board?.
///
@@ -2813,6 +3272,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Stowage position.
+ ///
+ public static string textStowagePosition {
+ get {
+ return ResourceManager.GetString("textStowagePosition", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Stowaways on board.
///
@@ -2849,6 +3317,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Subsidiary risks.
+ ///
+ public static string textSubsidiaryRisk {
+ get {
+ return ResourceManager.GetString("textSubsidiaryRisk", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Border police.
///
@@ -2921,6 +3398,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Technical name.
+ ///
+ public static string textTechnicalName {
+ get {
+ return ResourceManager.GetString("textTechnicalName", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Ticket No.
///
@@ -2984,6 +3470,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Transport index.
+ ///
+ public static string textTransportIndex {
+ get {
+ return ResourceManager.GetString("textTransportIndex", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Transport mode.
///
@@ -3011,6 +3506,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to UN number.
+ ///
+ public static string textUNNumber {
+ get {
+ return ResourceManager.GetString("textUNNumber", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Username.
///
@@ -3056,6 +3560,24 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Vehicle licence plate.
+ ///
+ public static string textVehicleLicensePlate {
+ get {
+ return ResourceManager.GetString("textVehicleLicensePlate", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Vessel class.
+ ///
+ public static string textVesselClass {
+ get {
+ return ResourceManager.GetString("textVesselClass", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Vessel name.
///
diff --git a/ENI-2/ENI2/ENI2/Properties/Resources.resx b/ENI-2/ENI2/ENI2/Properties/Resources.resx
index 487c37d2..69c8448b 100644
--- a/ENI-2/ENI2/ENI2/Properties/Resources.resx
+++ b/ENI-2/ENI2/ENI2/Properties/Resources.resx
@@ -1165,4 +1165,178 @@
Towage on departure
+
+ Bulk cargo shipping name
+
+
+ Cargo volume
+
+
+ Category
+
+
+ Columns "o" of OBC Code (value 15.19)
+
+
+ Container No.
+
+
+ Container position (Bay)
+
+
+ Container position (Row)
+
+
+ Container position (Tier)
+
+
+ Control temperature
+
+
+ Critical safety index (CSI)
+
+
+ Dangerous goods arrival
+
+
+ Dangerous goods departure
+
+
+ Dangerous goods on board
+
+
+ DG manifest on board
+
+
+ Emergency temperature
+
+
+ Excepted quantities
+
+
+ Flashpoint
+
+
+ Flashpoint information
+
+
+ General cargo
+
+
+ Gross quantity
+
+
+ IBC items
+
+
+ IGC items
+
+
+ IMDG items
+
+
+ IMO class / division / (compatibility group)
+
+
+ IMO class / subclass
+
+
+ IMSBC items
+
+
+ Limited quantity
+
+
+ Marine pollutant
+
+
+ MARPOL Annex I items
+
+
+ Material hazardous only in bulk
+
+
+ Max acitivity
+
+
+ MoU Baltic RoRo vessel
+
+
+ Net explosive mass
+
+
+ Net quantity
+
+
+ Number of packages
+
+
+ Package type
+
+
+ Packing group
+
+
+ Pollution category
+
+
+ Port of discharge
+
+
+ Port of loading
+
+
+ Product name
+
+
+ Proper shipping name
+
+
+ Quantity
+
+
+ Radionuclide name
+
+
+ Risks
+
+
+ Stowage position
+
+
+ Subsidiary risks
+
+
+ Technical name
+
+
+ Transport index
+
+
+ UN number
+
+
+ Vehicle licence plate
+
+
+ Vessel class
+
+
+ Identifier
+
+
+ IBC item
+
+
+ IGC item
+
+
+ IMDG item
+
+
+ IMSBC item
+
+
+ MARPOL Annex I item
+
\ No newline at end of file
diff --git a/ENI-2/ENI2/ENI2/Util/GlobalStructures.cs b/ENI-2/ENI2/ENI2/Util/GlobalStructures.cs
index 74d0921d..4fcb3db6 100644
--- a/ENI-2/ENI2/ENI2/Util/GlobalStructures.cs
+++ b/ENI-2/ENI2/ENI2/Util/GlobalStructures.cs
@@ -31,7 +31,7 @@ namespace ENI2.Util
Properties.Resources.textOtherLegalIdentityDocument
};
- public static string[] ShipSecurityLevels = { "1", "2", "3" };
+ public static byte[] ShipSecurityLevels = { 1, 2, 3 };
public static string[] edifact8025Codes =
{
@@ -61,6 +61,42 @@ namespace ENI2.Util
"Waste disposal"
};
+ public static string[] vesselClasses =
+ {
+ "INF1",
+ "INF2",
+ "INF3"
+ };
+
+ public static string[] packingGroups =
+ {
+ "NONE",
+ "I",
+ "II",
+ "III"
+ };
+
+ public static string[] pollutionCategories =
+ {
+ "X",
+ "Y",
+ "Z",
+ "OS"
+ };
+
+ public static string[] hazards =
+ {
+ "P",
+ "S",
+ "S/P"
+ };
+
+ public static string[] flashpointInformations =
+ {
+ "Not flammable",
+ "Above 60°",
+ "Less than 60°"
+ };
public static List EdiCodes
{
diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx
index 1845ae11..34441a54 100644
Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ
diff --git a/nsw/Source/bsmd.ExcelReadService/Util.cs b/nsw/Source/bsmd.ExcelReadService/Util.cs
index 04cfeb8e..761869f7 100644
--- a/nsw/Source/bsmd.ExcelReadService/Util.cs
+++ b/nsw/Source/bsmd.ExcelReadService/Util.cs
@@ -2201,12 +2201,12 @@ namespace bsmd.ExcelReadService
}
crew.CrewMemberLastName = lastName;
- reader.Conf.ConfirmText(crewLastName, lastName, crew.CrewMemberLastName.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(crewLastName, lastName, crew.CrewMemberLastName.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
crew.CrewMemberFirstName = firstName;
- reader.Conf.ConfirmText(crewFirstName, crew.CrewMemberFirstName, crew.CrewMemberFirstName.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(crewFirstName, crew.CrewMemberFirstName, crew.CrewMemberFirstName.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
crew.CrewMemberGender = reader.ReadGender(crewGender);
crew.CrewMemberDuty = reader.ReadText(crewDuty);
- reader.Conf.ConfirmText(crewDuty, crew.CrewMemberDuty, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(crewDuty, crew.CrewMemberDuty, crew.CrewMemberDuty.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
crew.CrewMemberNationality = reader.ReadNationality(crewNationality);
crew.CrewMemberPlaceOfBirth = reader.ReadText(crewPlaceOfBirth);
@@ -2216,10 +2216,10 @@ namespace bsmd.ExcelReadService
crew.CrewMemberIdentityDocumentType = reader.ReadIdentityDocumentType(crewIdentDocType);
crew.CrewMemberIdentityDocumentId = reader.ReadText(crewIdentDocId);
- reader.Conf.ConfirmText(crewIdentDocId, crew.CrewMemberIdentityDocumentId, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(crewIdentDocId, crew.CrewMemberIdentityDocumentId, crew.CrewMemberIdentityDocumentId.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
crew.CrewMemberVisaNumber = reader.ReadText(crewVisaNo);
- reader.Conf.ConfirmText(crewVisaNo, crew.CrewMemberVisaNumber, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(crewVisaNo, crew.CrewMemberVisaNumber, crew.CrewMemberVisaNumber.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
}
}
@@ -2253,12 +2253,12 @@ namespace bsmd.ExcelReadService
crew.IsDeparture = true;
crew.CrewMemberLastName = lastName;
- reader.Conf.ConfirmText(crewLastName, lastName, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(crewLastName, lastName, lastName.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
crew.CrewMemberFirstName = reader.ReadText(crewFirstName);
reader.Conf.ConfirmText(crewFirstName, crew.CrewMemberFirstName, crew.CrewMemberFirstName.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
crew.CrewMemberGender = reader.ReadGender(crewGender);
crew.CrewMemberDuty = reader.ReadText(crewDuty);
- reader.Conf.ConfirmText(crewDuty, crew.CrewMemberDuty, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(crewDuty, crew.CrewMemberDuty, crew.CrewMemberDuty.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
crew.CrewMemberNationality = reader.ReadNationality(crewNationality);
crew.CrewMemberPlaceOfBirth = reader.ReadText(crewPlaceOfBirth);
@@ -2268,10 +2268,10 @@ namespace bsmd.ExcelReadService
crew.CrewMemberIdentityDocumentType = reader.ReadIdentityDocumentType(crewIdentDocType);
crew.CrewMemberIdentityDocumentId = reader.ReadText(crewIdentDocId);
- reader.Conf.ConfirmText(crewIdentDocId, crew.CrewMemberIdentityDocumentId, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(crewIdentDocId, crew.CrewMemberIdentityDocumentId, crew.CrewMemberIdentityDocumentId.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
crew.CrewMemberVisaNumber = reader.ReadText(crewVisaNo);
- reader.Conf.ConfirmText(crewVisaNo, crew.CrewMemberVisaNumber, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(crewVisaNo, crew.CrewMemberVisaNumber, crew.CrewMemberVisaNumber.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
}
}
@@ -2316,25 +2316,25 @@ namespace bsmd.ExcelReadService
}
pas.PassengerLastName = lastName;
- reader.Conf.ConfirmText(pasLastName, lastName, lastName.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(pasLastName, lastName, lastName.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
pas.PassengerFirstName = firstName;
- reader.Conf.ConfirmText(pasFirstName, pas.PassengerFirstName, pas.PassengerFirstName.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(pasFirstName, pas.PassengerFirstName, pas.PassengerFirstName.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
pas.PassengerGender = reader.ReadGender(pasGender);
pas.PassengerNationality = reader.ReadNationality(pasNationality);
// TODO: Nicht klar ob hier LOCODEs kommen oder nicht
pas.PassengerPortOfEmbarkation = reader.ReadTextNoWhitespace(pasEmbarkation);
- reader.Conf.ConfirmText(pasEmbarkation, pas.PassengerPortOfEmbarkation, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(pasEmbarkation, pas.PassengerPortOfEmbarkation, pas.PassengerPortOfEmbarkation.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
pas.PassengerPortOfDisembarkation = reader.ReadTextNoWhitespace(pasDebarkation);
- reader.Conf.ConfirmText(pasDebarkation, pas.PassengerPortOfDisembarkation, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(pasDebarkation, pas.PassengerPortOfDisembarkation, pas.PassengerPortOfDisembarkation.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
pas.PassengerInTransit = reader.ReadBoolean(pasTransit);
pas.PassengerPlaceOfBirth = reader.ReadText(pasPlaceOfBirth);
- reader.Conf.ConfirmText(pasPlaceOfBirth, pas.PassengerPlaceOfBirth, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(pasPlaceOfBirth, pas.PassengerPlaceOfBirth, pas.PassengerPlaceOfBirth.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL: ExcelReader.ReadState.OK);
pas.PassengerDateOfBirth = reader.ReadBirthDate(pasDateOfBirth);
pas.PassengerIdentityDocumentType = reader.ReadIdentityDocumentType(pasIdentDocType);
pas.PassengerIdentityDocumentId = reader.ReadText(pasIdentDocId);
- reader.Conf.ConfirmText(pasIdentDocId, pas.PassengerIdentityDocumentId, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(pasIdentDocId, pas.PassengerIdentityDocumentId, pas.PassengerIdentityDocumentId.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
pas.PassengerVisaNumber = reader.ReadText(pasVisaNo);
- reader.Conf.ConfirmText(pasVisaNo, pas.PassengerVisaNumber, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(pasVisaNo, pas.PassengerVisaNumber, pas.PassengerVisaNumber.IsNullOrEmpty() ? ExcelReader.ReadState.WARN :ExcelReader.ReadState.OK);
}
}
@@ -2377,18 +2377,18 @@ namespace bsmd.ExcelReadService
pas.PassengerNationality = reader.ReadNationality(pasNationality);
// TODO: Nicht klar ob hier LOCODEs kommen oder nicht
pas.PassengerPortOfEmbarkation = reader.ReadTextNoWhitespace(pasEmbarkation);
- reader.Conf.ConfirmText(pasEmbarkation, pas.PassengerPortOfEmbarkation, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(pasEmbarkation, pas.PassengerPortOfEmbarkation, pas.PassengerPortOfEmbarkation.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
pas.PassengerPortOfDisembarkation = reader.ReadTextNoWhitespace(pasDebarkation);
- reader.Conf.ConfirmText(pasDebarkation, pas.PassengerPortOfDisembarkation, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(pasDebarkation, pas.PassengerPortOfDisembarkation, pas.PassengerPortOfDisembarkation.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
pas.PassengerInTransit = reader.ReadBoolean(pasTransit);
pas.PassengerPlaceOfBirth = reader.ReadText(pasPlaceOfBirth);
- reader.Conf.ConfirmText(pasPlaceOfBirth, pas.PassengerPlaceOfBirth, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(pasPlaceOfBirth, pas.PassengerPlaceOfBirth, pas.PassengerPlaceOfBirth.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
pas.PassengerDateOfBirth = reader.ReadBirthDate(pasDateOfBirth);
pas.PassengerIdentityDocumentType = reader.ReadIdentityDocumentType(pasIdentDocType);
pas.PassengerIdentityDocumentId = reader.ReadText(pasIdentDocId);
- reader.Conf.ConfirmText(pasIdentDocId, pas.PassengerIdentityDocumentId, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(pasIdentDocId, pas.PassengerIdentityDocumentId, pas.PassengerIdentityDocumentId.IsNullOrEmpty() ? ExcelReader.ReadState.FAIL : ExcelReader.ReadState.OK);
pas.PassengerVisaNumber = reader.ReadText(pasVisaNo);
- reader.Conf.ConfirmText(pasVisaNo, pas.PassengerVisaNumber, ExcelReader.ReadState.OK);
+ reader.Conf.ConfirmText(pasVisaNo, pas.PassengerVisaNumber, pas.PassengerVisaNumber.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
}
}
@@ -2715,21 +2715,7 @@ namespace bsmd.ExcelReadService
return result;
}
- #endregion
-
- /*
- private static DateTime ConstructDate(string etaDateString, string etaTime)
- {
- DateTime result = DateTime.Now;
- if (DateTime.TryParse(etaDateString, out result))
- {
- TimeSpan sp;
- if (TimeSpan.TryParse(etaTime, out sp))
- result += sp;
- }
- return result;
- }
- */
+ #endregion
#region GetMessageWithType
diff --git a/nsw/Source/bsmd.database/IMDGPosition.cs b/nsw/Source/bsmd.database/IMDGPosition.cs
index 54aa095b..6d5732fb 100644
--- a/nsw/Source/bsmd.database/IMDGPosition.cs
+++ b/nsw/Source/bsmd.database/IMDGPosition.cs
@@ -11,6 +11,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using System.Text;
namespace bsmd.database
{
@@ -154,6 +155,74 @@ namespace bsmd.database
public List SubsidiaryRiskList { get { return this.subsidiaryRisksList; } }
+ ///
+ /// Hilfsproperty, um subsidiary risks als kommaseparierte Liste anzuzeigen (ENI-2)
+ ///
+ public string SubsidiaryRiskText
+ {
+ get
+ {
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < this.subsidiaryRisksList.Count; i++)
+ {
+ if (i > 0)
+ sb.Append(", ");
+ sb.Append(this.subsidiaryRisksList[i].SubsidiaryRisk);
+ }
+ return sb.ToString();
+ }
+ set
+ {
+ if (value.IsNullOrEmpty())
+ {
+ foreach (SubsidiaryRisks sr in this.SubsidiaryRiskList)
+ DBManager.Instance.Delete(sr);
+ this.SubsidiaryRiskList.Clear();
+ }
+ else
+ {
+ string[] risks = value.Split(',');
+ List foundList = new List();
+
+ for (int i = 0; i < risks.Length; i++)
+ {
+ string risk = risks[i].Trim();
+ if (risk.Length > 0)
+ {
+ SubsidiaryRisks matchingRisk = null;
+ foreach (SubsidiaryRisks sr in this.SubsidiaryRiskList)
+ {
+ if (sr.SubsidiaryRisk.Equals(risk, StringComparison.OrdinalIgnoreCase))
+ {
+ matchingRisk = sr;
+ break;
+ }
+ }
+ if (matchingRisk != null)
+ {
+ foundList.Add(matchingRisk);
+ this.SubsidiaryRiskList.Remove(matchingRisk);
+ }
+ else
+ {
+ SubsidiaryRisks newRisk = new SubsidiaryRisks();
+ newRisk.IMDGPosition = this;
+ newRisk.SubsidiaryRisk = risk;
+ foundList.Add(newRisk);
+ }
+ }
+ }
+
+ // remove remaining risk (no longer valid)
+ foreach (SubsidiaryRisks remainingRisk in this.SubsidiaryRiskList)
+ DBManager.Instance.Delete(remainingRisk);
+ this.subsidiaryRisksList.Clear();
+ // add existing and new risk
+ this.subsidiaryRisksList.AddRange(foundList);
+ }
+ }
+ }
+
public string Identifier { get; set; }
#endregion
diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs
index ddac88d7..49a5bc15 100644
--- a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs
+++ b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs
@@ -2,6 +2,6 @@
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
[assembly: AssemblyProduct("BSMD NSW interface")]
-[assembly: AssemblyInformationalVersion("3.6.7")]
+[assembly: AssemblyInformationalVersion("3.6.8")]
[assembly: AssemblyCopyright("Copyright © 2014-2017 Informatikbüro Daniel Schick. All rights reserved.")]
[assembly: AssemblyTrademark("")]
\ No newline at end of file
diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs
index 66df411b..41122445 100644
--- a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs
+++ b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs
@@ -1,4 +1,4 @@
using System.Reflection;
-[assembly: AssemblyVersion("3.6.7.*")]
+[assembly: AssemblyVersion("3.6.8.*")]
diff --git a/nsw/Source/bsmd.database/Waste.cs b/nsw/Source/bsmd.database/Waste.cs
index 4090bbcc..8a744757 100644
--- a/nsw/Source/bsmd.database/Waste.cs
+++ b/nsw/Source/bsmd.database/Waste.cs
@@ -75,6 +75,14 @@ namespace bsmd.database
}
}
}
+
+ public string WasteTypeDisplayGrid
+ {
+ get
+ {
+ return string.Format("{0} {1}", WasteType, WasteTypeDisplayV4);
+ }
+ }
[Validation(ValidationCode.NOT_NULL)]
public int? WasteType { get; set; }
@@ -160,6 +168,7 @@ namespace bsmd.database
break;
}
+ query += " ORDER BY WasteType";
cmd.CommandText = query;
}