diff --git a/ENI2/App.config b/ENI2/App.config
index b38565c2..78004935 100644
--- a/ENI2/App.config
+++ b/ENI2/App.config
@@ -11,7 +11,7 @@
-
+
@@ -26,10 +26,10 @@
1000
- http://192.168.2.24/LockingService/LockingService.svc
+ http://192.168.2.24/LockingService/LockingService.svc
- Initial Catalog=nsw;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false
+ Initial Catalog=nsw;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false
@@ -60,6 +60,10 @@
+
+
+
+
diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index 68a3ec3f..037611bf 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -36,8 +36,8 @@
5.4.0.0
true
publish.html
- 1
- 7.2.7.1
+ 3
+ 7.2.7.3
false
true
true
@@ -140,26 +140,26 @@
packages\log4net.3.0.4\lib\net462\log4net.dll
-
- packages\Microsoft.Bcl.AsyncInterfaces.9.0.2\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\Microsoft.Bcl.AsyncInterfaces.dll
-
- packages\Microsoft.Extensions.DependencyInjection.9.0.2\lib\net462\Microsoft.Extensions.DependencyInjection.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\Microsoft.Extensions.DependencyInjection.dll
-
- packages\Microsoft.Extensions.DependencyInjection.Abstractions.9.0.2\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\Microsoft.Extensions.DependencyInjection.Abstractions.dll
-
- packages\Microsoft.Extensions.Logging.9.0.2\lib\net462\Microsoft.Extensions.Logging.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\Microsoft.Extensions.Logging.dll
-
- packages\Microsoft.Extensions.Logging.Abstractions.9.0.2\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\Microsoft.Extensions.Logging.Abstractions.dll
-
- packages\Microsoft.Extensions.Options.9.0.2\lib\net462\Microsoft.Extensions.Options.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\Microsoft.Extensions.Options.dll
-
- packages\Microsoft.Extensions.Primitives.9.0.2\lib\net462\Microsoft.Extensions.Primitives.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\Microsoft.Extensions.Primitives.dll
packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll
@@ -193,8 +193,8 @@
packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\PdfSharp.WPFonts.dll
-
- packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\System.Buffers.dll
@@ -202,27 +202,27 @@
packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\lib\net46\System.Data.SQLite.dll
-
- packages\System.Diagnostics.DiagnosticSource.9.0.2\lib\net462\System.Diagnostics.DiagnosticSource.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\System.Diagnostics.DiagnosticSource.dll
-
- packages\System.Memory.4.6.0\lib\net462\System.Memory.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\System.Memory.dll
-
- packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\System.Numerics.Vectors.dll
-
- packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\System.Runtime.CompilerServices.Unsafe.dll
-
- packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll
+
+ packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\System.Threading.Tasks.Extensions.dll
packages\PDFsharp-MigraDoc-GDI.6.1.1\lib\net472\System.ValueTuple.dll
@@ -937,6 +937,7 @@
+
Reference.svcmap
@@ -1051,7 +1052,6 @@
-
SettingsSingleFileGenerator
diff --git a/ENI2/EditControls/ChangePasswordDialog.xaml b/ENI2/EditControls/ChangePasswordDialog.xaml
index 318e3a4b..0fc9a191 100644
--- a/ENI2/EditControls/ChangePasswordDialog.xaml
+++ b/ENI2/EditControls/ChangePasswordDialog.xaml
@@ -3,9 +3,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:enictrl="clr-namespace:ENI2.Controls"
+ xmlns:enictrl="clr-namespace:ENI2.Controls"
+ xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d"
- Title="Change password" Height="215" Width="400" Loaded="EditWindowBase_Loaded" Background="AliceBlue">
+ Title="Change password" Height="243" Width="400" Loaded="EditWindowBase_Loaded" Background="AliceBlue">
@@ -13,6 +14,7 @@
+
@@ -20,14 +22,16 @@
-
-
-
+
+
+
-
+
+
+
diff --git a/ENI2/EditControls/ChangePasswordDialog.xaml.cs b/ENI2/EditControls/ChangePasswordDialog.xaml.cs
index 5912bb68..66f0a4a9 100644
--- a/ENI2/EditControls/ChangePasswordDialog.xaml.cs
+++ b/ENI2/EditControls/ChangePasswordDialog.xaml.cs
@@ -4,6 +4,7 @@
using bsmd.database;
using ENI2.Controls;
+using System;
using System.Windows;
using System.Windows.Controls;
@@ -36,43 +37,48 @@ namespace ENI2.EditControls
{
bool success = false;
string message = "";
- if(!textBoxOldPassword.Password.IsNullOrEmpty())
+ if (!textBoxOldPassword.Password.IsNullOrEmpty() || !textBoxNew1Password.Password.IsNullOrEmpty() || !textBoxNew2Password.Password.IsNullOrEmpty())
{
- if(CurrentUser.GetHash(textBoxOldPassword.Password).Equals(CurrentUser.PasswordHash))
+ if (!textBoxOldPassword.Password.IsNullOrEmpty())
{
- if(textBoxNew1Password.Password.IsNullOrEmpty() ||
- textBoxNew2Password.Password.IsNullOrEmpty() ||
- !textBoxNew1Password.Password.Equals(textBoxNew2Password.Password))
+ if (CurrentUser.GetHash(textBoxOldPassword.Password).Equals(CurrentUser.PasswordHash))
{
- message = "New passwords are empty or do not match";
- }
- else
- {
- if (textBoxOldPassword.Password.Equals(textBoxNew1Password.Password))
+ if (textBoxNew1Password.Password.IsNullOrEmpty() ||
+ textBoxNew2Password.Password.IsNullOrEmpty() ||
+ !textBoxNew1Password.Password.Equals(textBoxNew2Password.Password))
{
- message = "Old and new password are the same";
+ message = "New passwords are empty or do not match";
}
else
{
- CurrentUser.SetPassword(textBoxNew1Password.Password);
- DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(CurrentUser);
- success = true;
+ if (textBoxOldPassword.Password.Equals(textBoxNew1Password.Password))
+ {
+ message = "Old and new password are the same";
+ }
+ else
+ {
+ CurrentUser.SetPassword(textBoxNew1Password.Password);
+ success = true;
+ }
}
}
- }
+ else
+ {
+ message = "Old password is not correct";
+ }
+ }
else
{
- message = "Old password is not correct";
+ message = "Old password empty";
}
- }
- else
- {
- message = "Old password empty";
+ if (!success)
+ MessageBox.Show(message, "Changing password failed", MessageBoxButton.OK, MessageBoxImage.Error);
+ else
+ MessageBox.Show("Password successfully changed.", "Password changed", MessageBoxButton.OK, MessageBoxImage.Information);
}
- if (!success)
- MessageBox.Show(message, "Changing password failed", MessageBoxButton.OK, MessageBoxImage.Error);
- else
- MessageBox.Show("Password successfully changed.", "Password changed", MessageBoxButton.OK, MessageBoxImage.Information);
+ // user may have changed combobox default display value so we are saving anyway here
+ this.CurrentUser.ShipcallDisplayMode = (ReportingParty.ShipcallDisplayModeEnum)Enum.Parse(typeof(ReportingParty.ShipcallDisplayModeEnum), (string)this.comboBoxDefaultDisplay.SelectedValue);
+ DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(CurrentUser);
}
private void EditWindowBase_Loaded(object sender, RoutedEventArgs e)
@@ -82,6 +88,8 @@ namespace ENI2.EditControls
this.OkVisible = false;
var cancelButton = (Button)Template.FindName("buttonCancel", this);
cancelButton.Content = "Close";
+ this.comboBoxDefaultDisplay.ItemsSource = Util.EnumHelper.GetAllValuesAndDescription(typeof(ReportingParty.ShipcallDisplayModeEnum));
+ this.comboBoxDefaultDisplay.SelectedValue = this.CurrentUser.ShipcallDisplayMode;
}
#endregion
diff --git a/ENI2/EditControls/EditReportingPartyDialog.xaml b/ENI2/EditControls/EditReportingPartyDialog.xaml
index 86de7479..8b288bc5 100644
--- a/ENI2/EditControls/EditReportingPartyDialog.xaml
+++ b/ENI2/EditControls/EditReportingPartyDialog.xaml
@@ -48,7 +48,7 @@
-
+
@@ -69,7 +69,6 @@
-
diff --git a/ENI2/EditControls/EditReportingPartyDialog.xaml.cs b/ENI2/EditControls/EditReportingPartyDialog.xaml.cs
index 5ed5889d..decbd299 100644
--- a/ENI2/EditControls/EditReportingPartyDialog.xaml.cs
+++ b/ENI2/EditControls/EditReportingPartyDialog.xaml.cs
@@ -25,7 +25,7 @@ namespace ENI2.EditControls
private void EditReportingPartyDialog_Loaded(object sender, RoutedEventArgs e)
{
- this.comboBoxDefaultDisplay.ItemsSource = Util.EnumHelper.GetAllValuesAndDescription(typeof(ReportingParty.ShipcallDisplayModeEnum));
+
this.textBoxCity.Text = this.ReportingParty.City;
this.textBoxCountry.Text = this.ReportingParty.Country;
this.textBoxEMail.Text = this.ReportingParty.EMail;
@@ -42,7 +42,7 @@ namespace ENI2.EditControls
this.checkBoxAdministrator.IsChecked = this.ReportingParty.IsAdmin;
this.checkBoxArchived.IsChecked = this.ReportingParty.IsArchived;
this.checkBoxEditor.IsChecked = this.ReportingParty.IsEditor;
- this.comboBoxDefaultDisplay.SelectedValue = this.ReportingParty.ShipcallDisplayMode;
+
this.dateTimePickerChanged.Content = this.ReportingParty.Changed.HasValue ? this.ReportingParty.Changed.ToString() : "";
this.dateTimePickerCreated.Content = this.ReportingParty.Created.HasValue ? this.ReportingParty.Created.ToString() : "";
@@ -64,8 +64,7 @@ namespace ENI2.EditControls
this.ReportingParty.PostalCode = this.textBoxPostalCode.Text.Trim();
this.ReportingParty.StreetAndNumber = this.textBoxStreetNumber.Text.Trim();
this.ReportingParty.UserEMail = this.textBoxUserEMail.Text.Trim();
- this.ReportingParty.Logon = this.textBoxUserLogon.Text.Trim();
- this.ReportingParty.ShipcallDisplayMode = (ReportingParty.ShipcallDisplayModeEnum) Enum.Parse(typeof(ReportingParty.ShipcallDisplayModeEnum), (string) this.comboBoxDefaultDisplay.SelectedValue);
+ this.ReportingParty.Logon = this.textBoxUserLogon.Text.Trim();
if(!this.passwordBoxPassword.Password.IsNullOrEmpty())
{
diff --git a/ENI2/Properties/Resources.Designer.cs b/ENI2/Properties/Resources.Designer.cs
index c4e05a3c..67a8f811 100644
--- a/ENI2/Properties/Resources.Designer.cs
+++ b/ENI2/Properties/Resources.Designer.cs
@@ -4188,6 +4188,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to New password.
+ ///
+ public static string textNewPassword {
+ get {
+ return ResourceManager.GetString("textNewPassword", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Create new id.
///
@@ -4323,6 +4332,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Old password.
+ ///
+ public static string textOldPassword {
+ get {
+ return ResourceManager.GetString("textOldPassword", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to This only works if the grid is empty!.
///
@@ -4989,6 +5007,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Repeat new password.
+ ///
+ public static string textRepeatNewPassword {
+ get {
+ return ResourceManager.GetString("textRepeatNewPassword", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Reporting party.
///
@@ -5629,7 +5656,7 @@ namespace ENI2.Properties {
}
///
- /// Looks up a localized string similar to Cruise.
+ /// Looks up a localized string similar to 11 Cruise.
///
public static string textTab14 {
get {
diff --git a/ENI2/Properties/Resources.resx b/ENI2/Properties/Resources.resx
index 3c31bdc3..a012feb6 100644
--- a/ENI2/Properties/Resources.resx
+++ b/ENI2/Properties/Resources.resx
@@ -2195,7 +2195,7 @@
10 MDH
- Cruise
+ 11 Cruise
1-2 Berth
@@ -2218,4 +2218,13 @@
4 Tanker
+
+ New password
+
+
+ Old password
+
+
+ Repeat new password
+
\ No newline at end of file
diff --git a/ENI2/SheetDisplayControls/ATAControl.xaml b/ENI2/SheetDisplayControls/ATAControl.xaml
index 95d0f639..9f9fa332 100644
--- a/ENI2/SheetDisplayControls/ATAControl.xaml
+++ b/ENI2/SheetDisplayControls/ATAControl.xaml
@@ -16,7 +16,8 @@
-
+
+
diff --git a/ENI2/SheetDisplayControls/CrewDepartureControl.xaml.cs b/ENI2/SheetDisplayControls/CrewDepartureControl.xaml.cs
index cb141300..4719f84e 100644
--- a/ENI2/SheetDisplayControls/CrewDepartureControl.xaml.cs
+++ b/ENI2/SheetDisplayControls/CrewDepartureControl.xaml.cs
@@ -74,6 +74,8 @@ namespace ENI2.SheetDisplayControls
this.checkBoxCrewNotificationPAXDeparture.IsChecked = ((CREWD)this._crewdMessage.Elements[0]).NotificationPAX;
}
+ this.textBlockNumCrewEntriesDeparture.DataContext = this._crewdMessage;
+
// extra menu copy to CREWA
{
this.dataGridCrewListDeparture.ContextMenu.Items.Add(new Separator());
diff --git a/ENI2/SheetDisplayControls/CrewPreArrivalControl.xaml b/ENI2/SheetDisplayControls/CrewPreArrivalControl.xaml
index 4d3d0f4f..70d44d8b 100644
--- a/ENI2/SheetDisplayControls/CrewPreArrivalControl.xaml
+++ b/ENI2/SheetDisplayControls/CrewPreArrivalControl.xaml
@@ -16,7 +16,8 @@
-
+
+
@@ -40,7 +41,7 @@
-
diff --git a/ENI2/SheetDisplayControls/CrewPreArrivalControl.xaml.cs b/ENI2/SheetDisplayControls/CrewPreArrivalControl.xaml.cs
index 23be5067..b487b449 100644
--- a/ENI2/SheetDisplayControls/CrewPreArrivalControl.xaml.cs
+++ b/ENI2/SheetDisplayControls/CrewPreArrivalControl.xaml.cs
@@ -55,6 +55,7 @@ namespace ENI2.SheetDisplayControls
}
this.textBox_NameMaster.DataContext = _name;
+ this.textBlockNumCrewEntries.DataContext = _crewaMessage;
#region init CREWA
diff --git a/ENI2/SheetDisplayControls/DangerousCargoControl.xaml b/ENI2/SheetDisplayControls/DangerousCargoControl.xaml
index 5da65330..a855a8c8 100644
--- a/ENI2/SheetDisplayControls/DangerousCargoControl.xaml
+++ b/ENI2/SheetDisplayControls/DangerousCargoControl.xaml
@@ -15,45 +15,38 @@
-
-
+
+
+
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI2/SheetDisplayControls/PassengerDepartureControl.xaml.cs b/ENI2/SheetDisplayControls/PassengerDepartureControl.xaml.cs
index 799684ec..24ca2cfa 100644
--- a/ENI2/SheetDisplayControls/PassengerDepartureControl.xaml.cs
+++ b/ENI2/SheetDisplayControls/PassengerDepartureControl.xaml.cs
@@ -75,6 +75,8 @@ namespace ENI2.SheetDisplayControls
this.checkBoxPasNotificationPAXDeparture.IsChecked = ((PASD)this._pasdMessage.Elements[0]).NotificationPAX;
}
+ this.textBlockNumPasEntriesDeparture.DataContext = this._pasdMessage;
+
// extra menu copy to PASA
{
this.dataGridPassengerListDeparture.ContextMenu.Items.Add(new Separator());
diff --git a/ENI2/SheetDisplayControls/PassengerPreArrivalControl.xaml.cs b/ENI2/SheetDisplayControls/PassengerPreArrivalControl.xaml.cs
index 89f475a8..5350b8c3 100644
--- a/ENI2/SheetDisplayControls/PassengerPreArrivalControl.xaml.cs
+++ b/ENI2/SheetDisplayControls/PassengerPreArrivalControl.xaml.cs
@@ -58,7 +58,9 @@ namespace ENI2.SheetDisplayControls
{
this._pasMessage = this.Core.CreateMessage(Message.NotificationClass.PASA);
this.Messages.Add(this._pasMessage);
- }
+ }
+
+ this.textBlockNumPasEntries.DataContext = this._pasMessage;
this.dataGridPassengerList.Initialize();
this.dataGridPassengerList.ItemsSource = this._pasMessage.Elements;
diff --git a/ENI2/SheetDisplayControls/PortControl.xaml b/ENI2/SheetDisplayControls/PortControl.xaml
index a719dca8..1164b36f 100644
--- a/ENI2/SheetDisplayControls/PortControl.xaml
+++ b/ENI2/SheetDisplayControls/PortControl.xaml
@@ -1,23 +1,36 @@
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -37,11 +50,12 @@
-
+
-
-
+
@@ -75,7 +89,8 @@
-
+
+
@@ -93,10 +108,11 @@
+
-
+
@@ -153,17 +169,19 @@
-
+
-
+
-
+
-
-
-
+
+
+
+
@@ -179,7 +197,8 @@
-
+
+
@@ -193,7 +212,7 @@
-
+
@@ -205,9 +224,9 @@
-
-
-
+
+
@@ -248,15 +267,18 @@
-
+
+
+
+
-
+
@@ -266,19 +288,23 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -322,7 +348,7 @@
-
+
@@ -389,8 +415,8 @@
-
-
+
+