diff --git a/ENI2/AnmeldungenControl.xaml.cs b/ENI2/AnmeldungenControl.xaml.cs
index be34290f..47a77da1 100644
--- a/ENI2/AnmeldungenControl.xaml.cs
+++ b/ENI2/AnmeldungenControl.xaml.cs
@@ -1,20 +1,8 @@
// Copyright (c) 2017 Informatibüro Daniel Schick
-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 System.Windows.Controls;
+using System.Windows.Input;
namespace ENI2
{
@@ -62,7 +50,7 @@ namespace ENI2
{
if((this.MessageCoreSelected != null) && (aMessageCore != null))
{
- this.MessageCoreSelected(aMessageCore);
+ this.MessageCoreSelected(aMessageCore, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode);
}
}
diff --git a/ENI2/Controls/MaerskListControl.xaml.cs b/ENI2/Controls/MaerskListControl.xaml.cs
index 1026f49a..20e69a3b 100644
--- a/ENI2/Controls/MaerskListControl.xaml.cs
+++ b/ENI2/Controls/MaerskListControl.xaml.cs
@@ -607,7 +607,7 @@ namespace ENI2.Controls
MaerskData md = grid.SelectedItem as MaerskData;
if(md.MessageCore != null) {
Util.UIHelper.SetBusyState();
- this.MessageCoreSelected?.Invoke(md.MessageCore);
+ this.MessageCoreSelected?.Invoke(md.MessageCore, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode);
}
}
}
diff --git a/ENI2/DetailRootControl.xaml.cs b/ENI2/DetailRootControl.xaml.cs
index 6aece539..e4ff3bd8 100644
--- a/ENI2/DetailRootControl.xaml.cs
+++ b/ENI2/DetailRootControl.xaml.cs
@@ -644,12 +644,15 @@ namespace ENI2
this.detailView.Children.Clear();
this.controlCache.Clear();
- // return to "new" overviewdan
+ int currentIndex = this.listBoxMessages.SelectedIndex;
+
+ // return to "new" overview
Dispatcher.BeginInvoke((System.Action)(() =>
{
this.listBoxMessages_SelectionChanged(this, null);
shipNameLabel.Text = this.Core.Shipname;
shipEMailLabel.Text = this.Core.HerbergEmailContactReportingVessel;
+ this.listBoxMessages.SelectedIndex = currentIndex;
}
));
diff --git a/ENI2/DetailViewControls/DepartureNotificationDetailControl.xaml.cs b/ENI2/DetailViewControls/DepartureNotificationDetailControl.xaml.cs
index c139a318..1f78a706 100644
--- a/ENI2/DetailViewControls/DepartureNotificationDetailControl.xaml.cs
+++ b/ENI2/DetailViewControls/DepartureNotificationDetailControl.xaml.cs
@@ -40,7 +40,7 @@ namespace ENI2.DetailViewControls
this.RegisterIntegerUpDownChange(this.integerUpDownPassengersOnBoard, Message.NotificationClass.POBD);
this.RegisterIntegerUpDownChange(this.integerUpDownPersonsOnBoard, Message.NotificationClass.POBD);
this.RegisterIntegerUpDownChange(this.integerUpDownStowawaysOnBoard, Message.NotificationClass.POBD);
- this.dataGridBKRD.CellEditEnding += (obj, ev) => { this.OnNotificationClassChanged(Message.NotificationClass.BKRD); };
+ this.dataGridBKRD.CellEditEnding += (obj, ev) => { this.SublistElementChanged(Message.NotificationClass.BKRD); };
startupComplete = true;
}
diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index 037611bf..33c25700 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -36,8 +36,8 @@
5.4.0.0
true
publish.html
- 3
- 7.2.7.3
+ 5
+ 7.2.7.5
false
true
true
diff --git a/ENI2/EditControls/SelectPortAreaDialog.xaml.cs b/ENI2/EditControls/SelectPortAreaDialog.xaml.cs
index 9f9d85c4..c0ea161f 100644
--- a/ENI2/EditControls/SelectPortAreaDialog.xaml.cs
+++ b/ENI2/EditControls/SelectPortAreaDialog.xaml.cs
@@ -65,7 +65,7 @@ namespace ENI2.EditControls
private void textBoxSearchDescription_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e)
{
string searchText = this.textBoxSearchDescription.Text.Trim();
-
+ if (_portAreas == null) return;
lock (filterLock)
{
IEnumerable filtered = _portAreas;
diff --git a/ENI2/MainWindow.xaml.cs b/ENI2/MainWindow.xaml.cs
index 01bcc4b2..6bf2551b 100644
--- a/ENI2/MainWindow.xaml.cs
+++ b/ENI2/MainWindow.xaml.cs
@@ -135,7 +135,7 @@ namespace ENI2
this._dbWatchDog.Register(aMessageCore);
drc.HighlightReset += Drc_HighlightReset;
- drc.OpenNewCoreRequested += (core) => this.AnmeldungenControl_MessageCoreSelected(core);
+ drc.OpenNewCoreRequested += (core) => this.AnmeldungenControl_MessageCoreSelected(core, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode);
drc.ReloadCoreRequested += Drc_ReloadCoreRequested;
}
@@ -472,7 +472,7 @@ namespace ENI2
if (((ShowIdDialog)sid).OpenCore)
{
Dispatcher.BeginInvoke((Action)(() => {
- this.AnmeldungenControl_MessageCoreSelected(closedDialog.Core); // in einem neuen Reiter öffnen
+ this.AnmeldungenControl_MessageCoreSelected(closedDialog.Core, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode); // in einem neuen Reiter öffnen
}));
}
@@ -540,7 +540,7 @@ namespace ENI2
// Meldeklassen für neuen Anlauf erzeugen:
bsmd.database.Util.CreateMessagesForCore(newCore, null, userEntity);
- this.AnmeldungenControl_MessageCoreSelected(newCore); // in einem neuen Reiter öffnen
+ this.AnmeldungenControl_MessageCoreSelected(newCore, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode); // in einem neuen Reiter öffnen
// watchdog registrieren, damit die "grüne" Markierung erscheint, sobald die Anmeldung durch den Excel-Prozess gelaufen ist.
this._dbWatchDog.Register(newCore);
@@ -612,7 +612,7 @@ namespace ENI2
showIdDialog.Closed += (sid, showIdArgs) =>
{
if (((ShowIdDialog)sid).OpenCore)
- this.AnmeldungenControl_MessageCoreSelected(changedCore);
+ this.AnmeldungenControl_MessageCoreSelected(changedCore, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode);
};
showIdDialog.Show();
showIdDialog.Activate();
diff --git a/ENI2/Properties/Resources.Designer.cs b/ENI2/Properties/Resources.Designer.cs
index 67a8f811..ffaba11f 100644
--- a/ENI2/Properties/Resources.Designer.cs
+++ b/ENI2/Properties/Resources.Designer.cs
@@ -4008,6 +4008,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to MDH simplification available.
+ ///
+ public static string textMDHSimplification {
+ get {
+ return ResourceManager.GetString("textMDHSimplification", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Was a medical practitioner consulted?.
///
@@ -5205,6 +5214,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to SEC simplification available.
+ ///
+ public static string textSECSimplification {
+ get {
+ return ResourceManager.GetString("textSECSimplification", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Security.
///
diff --git a/ENI2/Properties/Resources.resx b/ENI2/Properties/Resources.resx
index a012feb6..1da7b6ab 100644
--- a/ENI2/Properties/Resources.resx
+++ b/ENI2/Properties/Resources.resx
@@ -2227,4 +2227,10 @@
Repeat new password
+
+ MDH simplification available
+
+
+ SEC simplification available
+
\ No newline at end of file
diff --git a/ENI2/SheetDisplayControls/PortControl.xaml b/ENI2/SheetDisplayControls/PortControl.xaml
index 1164b36f..5202b86d 100644
--- a/ENI2/SheetDisplayControls/PortControl.xaml
+++ b/ENI2/SheetDisplayControls/PortControl.xaml
@@ -207,6 +207,7 @@
+
@@ -214,18 +215,20 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -304,7 +307,7 @@
-
+
diff --git a/ENI2/SheetDisplayControls/PortControl.xaml.cs b/ENI2/SheetDisplayControls/PortControl.xaml.cs
index fe65e4fe..7f6636dc 100644
--- a/ENI2/SheetDisplayControls/PortControl.xaml.cs
+++ b/ENI2/SheetDisplayControls/PortControl.xaml.cs
@@ -107,6 +107,7 @@ namespace ENI2.SheetDisplayControls
portAreas = LocalizedLookup.getPortAreasForLocode(this.Core.PoC);
this.comboBoxPortArea.ItemsSource = portAreas;
+ this.comboBoxPortArea.DataContext = this._info;
this.textRequestedPostionInPortOfCall.DataContext = this._info;
this.textSpecialRequirements.DataContext = this._info;
this.textConstructionCharacteristics.DataContext = this._info;
@@ -160,6 +161,7 @@ namespace ENI2.SheetDisplayControls
this.comboBoxConditionCargoBallastTanks.DataContext = this._pre72H;
this.textBoxNatureOfCargo.DataContext = this._pre72H;
this.doubleUpDownVolumeOfCargo.DataContext = this._pre72H;
+ this.checkBoxTanker.DataContext = this._pre72H;
// 2.6
this.dataGridLADG.Initialize();
@@ -170,6 +172,8 @@ namespace ENI2.SheetDisplayControls
this.dataGridLADG.CreateRequested += DataGridLADG_CreateRequested;
// 2.7
+ this.checkBoxValidExemption.Checked += CheckBoxValidExemption_Checked;
+ this.checkBoxValidExemption.Unchecked += CheckBoxValidExemption_Checked;
this.checkBoxAccurateCorrectDetails.DataContext = _was;
this.checkBoxValidExemption.DataContext = _was;
this.dataGridWaste.Initialize();
@@ -200,6 +204,17 @@ namespace ENI2.SheetDisplayControls
}
+ private void CheckBoxValidExemption_Checked(object sender, RoutedEventArgs e)
+ {
+ bool on = !(this.checkBoxValidExemption.IsChecked ?? false);
+ this.checkBoxAccurateCorrectDetails.IsEnabled = on;
+ this.locodeCtrlLastWastePort.IsEnabled = on;
+ this.datePickerDateLastDisposal.IsEnabled = on;
+ this.textBoxWasteDisposalServiceProviders.IsEnabled = on;
+ this.gridWasteControls.IsEnabled = on;
+ this.dataGridWaste.IsEnabled = on;
+ }
+
public override void SetEnabled(bool enabled)
{
base.SetEnabled(enabled);
diff --git a/ENI2/SheetDisplayControls/PreArrivalControl.xaml b/ENI2/SheetDisplayControls/PreArrivalControl.xaml
index b4bec2a2..4f69b3b5 100644
--- a/ENI2/SheetDisplayControls/PreArrivalControl.xaml
+++ b/ENI2/SheetDisplayControls/PreArrivalControl.xaml
@@ -15,7 +15,7 @@
-
+
@@ -50,11 +50,11 @@
-
+
-
+
-
+
diff --git a/ENI2/SheetDisplayControls/PreDepartureControl.xaml b/ENI2/SheetDisplayControls/PreDepartureControl.xaml
index 728a6901..ffd3e174 100644
--- a/ENI2/SheetDisplayControls/PreDepartureControl.xaml
+++ b/ENI2/SheetDisplayControls/PreDepartureControl.xaml
@@ -92,22 +92,22 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI2/SheetDisplayControls/ShipDataControl.xaml b/ENI2/SheetDisplayControls/ShipDataControl.xaml
index 7221720b..7795e517 100644
--- a/ENI2/SheetDisplayControls/ShipDataControl.xaml
+++ b/ENI2/SheetDisplayControls/ShipDataControl.xaml
@@ -147,59 +147,59 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ENI2/SheetDisplayControls/VoyageControl.xaml b/ENI2/SheetDisplayControls/VoyageControl.xaml
index 6a7b9598..e44e3624 100644
--- a/ENI2/SheetDisplayControls/VoyageControl.xaml
+++ b/ENI2/SheetDisplayControls/VoyageControl.xaml
@@ -107,11 +107,11 @@
-
+
-
+
@@ -220,7 +220,7 @@
-
+
@@ -247,7 +247,7 @@
-
+
diff --git a/ENI2/SheetDisplayControls/VoyageControl.xaml.cs b/ENI2/SheetDisplayControls/VoyageControl.xaml.cs
index a574ae3c..b652fe95 100644
--- a/ENI2/SheetDisplayControls/VoyageControl.xaml.cs
+++ b/ENI2/SheetDisplayControls/VoyageControl.xaml.cs
@@ -182,13 +182,16 @@ namespace ENI2.SheetDisplayControls
this.checkBoxStowaways.DataContext = _bpol;
this.checkBoxCruiseShip.DataContext = _bpol;
+ this.checkBoxCruiseShip.Checked += CheckBoxCruiseShip_Checked;
+ this.checkBoxCruiseShip.Unchecked += CheckBoxCruiseShip_Checked;
+ this.CheckBoxCruiseShip_Checked(null, null);
this.dataGridPortOfItinerary.Initialize();
this.dataGridPortOfItinerary.ItemsSource = _bpol.PortOfItineraries;
this.dataGridPortOfItinerary.AddingNewItem += DataGridPortOfItinerary_AddingNewItem;
this.dataGridPortOfItinerary.EditRequested += DataGridPortOfItinerary_EditRequested;
this.dataGridPortOfItinerary.DeleteRequested += DataGridPortOfItinerary_DeleteRequested;
this.dataGridPortOfItinerary.CreateRequested += DataGridPortOfItinerary_CreateRequested;
- }
+ }
public override void SetEnabled(bool enabled)
{
@@ -251,7 +254,7 @@ namespace ENI2.SheetDisplayControls
}
private void checkBoxKielCanalPassagePlanned_Checked(object sender, RoutedEventArgs e)
- {
+ {
this.dateTimePickerKielCanalPassagePlannedIncomming.IsEnabled = this.checkBoxKielCanalPassagePlanned.IsChecked ?? false;
this.dateTimePickerKielCanalPassagePlannedOutgoing.IsEnabled = this.checkBoxKielCanalPassagePlanned.IsChecked ?? false;
}
@@ -284,6 +287,12 @@ namespace ENI2.SheetDisplayControls
this.dataGridSanitaryMeasures.IsReadOnly = !(this.checkBoxSanitaryMeasuresApplied.IsChecked ?? false);
}
+ private void CheckBoxCruiseShip_Checked(object sender, RoutedEventArgs e)
+ {
+ this.buttonImportPortOfItineraryFromSEC.IsEnabled = this.checkBoxCruiseShip.IsChecked ?? false;
+ this.dataGridPortOfItinerary.IsEnabled = this.checkBoxCruiseShip.IsChecked ?? false;
+ }
+
private void buttonImportExcelLast10PortFacilities_Click(object sender, RoutedEventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog
@@ -1032,6 +1041,6 @@ namespace ENI2.SheetDisplayControls
}
#endregion
-
+
}
}
diff --git a/ENI2/SheetDisplayControls/WasteReceiptsControl.xaml b/ENI2/SheetDisplayControls/WasteReceiptsControl.xaml
index aa7291e0..e8efe91c 100644
--- a/ENI2/SheetDisplayControls/WasteReceiptsControl.xaml
+++ b/ENI2/SheetDisplayControls/WasteReceiptsControl.xaml
@@ -71,6 +71,11 @@
+
+
+
diff --git a/ENI2/Util/InverseBooleanConverter.cs b/ENI2/Util/InverseBooleanConverter.cs
index ab9b9382..dfb18900 100644
--- a/ENI2/Util/InverseBooleanConverter.cs
+++ b/ENI2/Util/InverseBooleanConverter.cs
@@ -28,23 +28,32 @@ namespace ENI2.Util
public object Convert(object value, Type targetType, object parameter,
System.Globalization.CultureInfo culture)
{
- if (targetType != typeof(bool?))
- throw new InvalidOperationException("The target must be a boolean");
+
+ if (targetType == typeof(bool?))
+ {
+ if (!((bool?)value).HasValue) return null;
+ return !(bool?)value;
+ }
- if (!((bool?)value).HasValue) return null;
+ if (targetType == typeof(bool))
+ return !(bool) value;
- return !(bool?)value;
+ throw new InvalidOperationException("The target must be a boolean");
}
public object ConvertBack(object value, Type targetType, object parameter,
System.Globalization.CultureInfo culture)
{
- if (targetType != typeof(bool?))
- throw new InvalidOperationException("The target must be a boolean");
+ if (targetType == typeof(bool?))
+ {
+ if (!((bool?)value).HasValue) return null;
+ return !(bool?)value;
+ }
- if (!((bool?)value).HasValue) return null;
+ if(targetType == typeof(bool))
+ return !(bool)value;
- return !(bool?)value;
+ throw new InvalidOperationException("The target must be a boolean");
}
#endregion
diff --git a/bsmd.database/NOA_NOD.cs b/bsmd.database/NOA_NOD.cs
index 5969dec3..b726366f 100644
--- a/bsmd.database/NOA_NOD.cs
+++ b/bsmd.database/NOA_NOD.cs
@@ -83,7 +83,7 @@ namespace bsmd.database
public DateTime? ETAToNextPort { get; set; }
[ENI2Validation]
- public bool? IsAnchored { get; set; }
+ public bool? IsAnchored { get; set; } = false;
#endregion
diff --git a/bsmd.database/PRE72H.cs b/bsmd.database/PRE72H.cs
index 012886d8..797e7105 100644
--- a/bsmd.database/PRE72H.cs
+++ b/bsmd.database/PRE72H.cs
@@ -28,7 +28,7 @@ namespace bsmd.database
[Validation(ValidationCode.NOT_NULL)]
[LookupName("PRE72H.Tanker")]
[ENI2Validation]
- public bool? Tanker { get; set; }
+ public bool? Tanker { get; set; } = false;
[ShowReport]
[ENI2Validation]
diff --git a/bsmd.database/SEC.cs b/bsmd.database/SEC.cs
index d4dc1641..c4d77ac1 100644
--- a/bsmd.database/SEC.cs
+++ b/bsmd.database/SEC.cs
@@ -140,7 +140,7 @@ namespace bsmd.database
public byte? GeneralDescriptionOfCargo { get; set; }
[ENI2Validation]
- public bool? AreMatterToReport { get; set; }
+ public bool? AreMatterToReport { get; set; } = false;
[LookupName("SEC.MatterToReport")]
[MaxLength(1024)]