diff --git a/ENI2/DetailViewControls/PortNotificationDetailControl.xaml.cs b/ENI2/DetailViewControls/PortNotificationDetailControl.xaml.cs
index bc1ae6c4..752e4bb8 100644
--- a/ENI2/DetailViewControls/PortNotificationDetailControl.xaml.cs
+++ b/ENI2/DetailViewControls/PortNotificationDetailControl.xaml.cs
@@ -491,7 +491,7 @@ namespace ENI2.DetailViewControls
{
PortAreaInfo pai = this.comboBoxPortAreaHelper.SelectedItem as PortAreaInfo;
// this.comboBoxPortAreaHelper.ToolTip = $"{pai.Remark} Ships: {pai.Ships} Agentur: {pai.Agency} Liegeplatz: {pai.Berth}";
- this.textBlockPortAreaRemarks.Text = $"Ag:{pai.Agency} Ship:{pai.Ships} :{pai.Remark}";
+ this.textBlockPortAreaRemarks.Text = $"Agency:{pai.Agency}\nShip:{pai.Ships}\nRemark:{pai.Remark}";
}
}
diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index f5bd8965..1a1824a8 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -36,7 +36,7 @@
5.4.0.0
true
publish.html
- 2
+ 4
7.13.0.%2a
false
true
diff --git a/ENI2/EditControls/EditCREWDialog.xaml.cs b/ENI2/EditControls/EditCREWDialog.xaml.cs
index 5b1bea43..6c1d1883 100644
--- a/ENI2/EditControls/EditCREWDialog.xaml.cs
+++ b/ENI2/EditControls/EditCREWDialog.xaml.cs
@@ -2,6 +2,7 @@
// Description: CREW Bearbeitungsdialog
//
+using System;
using System.Windows;
using bsmd.database;
@@ -15,6 +16,9 @@ namespace ENI2.EditControls
///
public partial class EditCREWDialog : EditWindowBase
{
+
+ private static DateTime MAXDATE = new DateTime(2198, 12, 31);
+
public EditCREWDialog()
{
InitializeComponent();
@@ -35,15 +39,25 @@ namespace ENI2.EditControls
this.textBoxPlaceOfBirth.Text = this.CREW.CrewMemberPlaceOfBirth;
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
this.comboBoxNationality.SelectedValue = this.CREW.CrewMemberNationality;
- this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth;
+ if (this.CREW.CrewMemberDateOfBirth > MAXDATE)
+ this.CREW.CrewMemberDateOfBirth = MAXDATE;
+ else
+ this.datePickerDateOfBirth.SelectedDate = this.CREW.CrewMemberDateOfBirth;
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeDict;
this.comboBoxIdDocType.SelectedValue = this.CREW.CrewMemberIdentityDocumentType?.ToString();
this.textBoxIdDocNumber.Text = this.CREW.CrewMemberIdentityDocumentId;
this.textBoxVisaNumber.Text = this.CREW.CrewMemberVisaNumber;
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
this.comboBoxIssuingState.SelectedValue = this.CREW.CrewMemberIdentityDocumentIssuingState;
- if(this.CREW.CrewMemberIdentityDocumentExpiryDate.HasValue)
- this.datePickerExpiryDate.SelectedDate = this.CREW.CrewMemberIdentityDocumentExpiryDate;
+ if (this.CREW.CrewMemberIdentityDocumentExpiryDate > MAXDATE)
+ {
+ this.datePickerExpiryDate.SelectedDate = MAXDATE;
+ }
+ else
+ {
+ if (this.CREW.CrewMemberIdentityDocumentExpiryDate.HasValue)
+ this.datePickerExpiryDate.SelectedDate = MAXDATE;
+ }
// this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict; // XXX: TODO
// this.comboBoxCountryOfBirth.SelectedValue = this.CREW.CrewMemberCountryOfBirth;
// this.textBoxEffects.Text = this.CREW.Effects;
diff --git a/ENI2/EditControls/EditPasDialog.xaml.cs b/ENI2/EditControls/EditPasDialog.xaml.cs
index 50ec611e..e5910f44 100644
--- a/ENI2/EditControls/EditPasDialog.xaml.cs
+++ b/ENI2/EditControls/EditPasDialog.xaml.cs
@@ -2,6 +2,7 @@
// Description: PAS Bearbeitungsdialog
//
+using System;
using System.Windows;
using bsmd.database;
@@ -15,6 +16,9 @@ namespace ENI2.EditControls
///
public partial class EditPASDialog : EditWindowBase
{
+
+ private static DateTime MAXDATE = new DateTime(2198, 12, 31);
+
public EditPASDialog()
{
InitializeComponent();
@@ -34,7 +38,10 @@ namespace ENI2.EditControls
this.textBoxPlaceOfBirth.Text = this.PAS.PassengerPlaceOfBirth;
this.comboBoxNationality.ItemsSource = bsmd.database.CREW.NationalityDict;
this.comboBoxNationality.SelectedValue = this.PAS.PassengerNationality;
- this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth;
+ if (this.PAS.PassengerDateOfBirth > MAXDATE)
+ this.datePickerDateOfBirth.SelectedDate = MAXDATE;
+ else
+ this.datePickerDateOfBirth.SelectedDate = this.PAS.PassengerDateOfBirth;
this.comboBoxIdDocType.ItemsSource = GlobalStructures.IDDocTypeDict;
this.comboBoxIdDocType.SelectedValue = this.PAS.PassengerIdentityDocumentType?.ToString();
this.textBoxIdDocNumber.Text = this.PAS.PassengerIdentityDocumentId;
@@ -44,8 +51,16 @@ namespace ENI2.EditControls
this.checkBoxTransitPassenger.IsChecked = this.PAS.PassengerInTransit;
this.comboBoxIssuingState.ItemsSource = bsmd.database.CREW.NationalityDict;
this.comboBoxIssuingState.SelectedValue = this.PAS.PassengerIdentityDocumentIssuingState;
- if(this.PAS.PassengerIdentityDocumentExpiryDate.HasValue)
- this.datePickerExpiryDate.SelectedDate = this.PAS.PassengerIdentityDocumentExpiryDate;
+
+ if (this.PAS.PassengerIdentityDocumentExpiryDate > MAXDATE)
+ {
+ this.datePickerExpiryDate.SelectedDate = MAXDATE;
+ }
+ else
+ {
+ if (this.PAS.PassengerIdentityDocumentExpiryDate.HasValue)
+ this.datePickerExpiryDate.SelectedDate = this.PAS.PassengerIdentityDocumentExpiryDate;
+ }
// XXX : TODO
//this.comboBoxCountryOfBirth.ItemsSource = bsmd.database.CREW.NationalityDict;
//this.comboBoxCountryOfBirth.SelectedValue = this.PAS.PassengerCountryOfBirth;
diff --git a/ENI2/Excel/ExcelUtil.cs b/ENI2/Excel/ExcelUtil.cs
index 791465f0..fb267eeb 100644
--- a/ENI2/Excel/ExcelUtil.cs
+++ b/ENI2/Excel/ExcelUtil.cs
@@ -1446,6 +1446,10 @@ namespace ENI2.Excel
string crewNameString = reader.ReadText(crewName);
poc30d.PortOfCallLast30DaysCrewMembersJoined = !crewNameString.IsNullOrEmpty();
+ // if crew members joined is set explicitly to true and the name is empty, still set the field to true
+ if (!(poc30d.PortOfCallLast30DaysCrewMembersJoined ?? false) && (PortOfCallLast30DaysCrewMembersJoinedFlag ?? false))
+ poc30d.PortOfCallLast30DaysCrewMembersJoined = true;
+
if (poc30d.PortOfCallLast30DaysCrewMembersJoined ?? false)
{
// try different separators
diff --git a/misc/db.sqlite b/misc/db.sqlite
index 639d6066..be535152 100644
Binary files a/misc/db.sqlite and b/misc/db.sqlite differ