diff --git a/ENI2/App.config b/ENI2/App.config
index 8d424cb1..94b79aa4 100644
--- a/ENI2/App.config
+++ b/ENI2/App.config
@@ -85,7 +85,7 @@
-
+
@@ -121,7 +121,7 @@
-
+
@@ -129,11 +129,11 @@
-
+
-
+
diff --git a/ENI2/Controls/WASExemptionsControl.xaml b/ENI2/Controls/WASExemptionsControl.xaml
new file mode 100644
index 00000000..103ccb1b
--- /dev/null
+++ b/ENI2/Controls/WASExemptionsControl.xaml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI2/Controls/WASExemptionsControl.xaml.cs b/ENI2/Controls/WASExemptionsControl.xaml.cs
new file mode 100644
index 00000000..6823695f
--- /dev/null
+++ b/ENI2/Controls/WASExemptionsControl.xaml.cs
@@ -0,0 +1,53 @@
+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;
+
+namespace ENI2.Controls
+{
+ ///
+ /// Interaction logic for WASExemptionsControl.xaml
+ ///
+ public partial class WASExemptionsControl : UserControl
+ {
+ public WASExemptionsControl()
+ {
+ InitializeComponent();
+ }
+
+ private void buttonSave_Click(object sender, RoutedEventArgs e)
+ {
+
+ }
+
+ private void buttonImport_Click(object sender, RoutedEventArgs e)
+ {
+
+ }
+
+ private void dataGridWASExemptions_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
+ {
+
+ }
+
+ private void dataGridWASExemptions_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
+ {
+
+ }
+
+ private void dataGridWASExemptions_MouseDoubleClick(object sender, MouseButtonEventArgs e)
+ {
+
+ }
+ }
+}
diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index 079da1f6..41e3e71f 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -140,11 +140,11 @@
packages\ClosedXML.Parser.2.0.0\lib\netstandard2.0\ClosedXML.Parser.dll
-
- packages\DocumentFormat.OpenXml.3.3.0\lib\net46\DocumentFormat.OpenXml.dll
+
+ packages\DocumentFormat.OpenXml.3.4.1\lib\net46\DocumentFormat.OpenXml.dll
-
- packages\DocumentFormat.OpenXml.Framework.3.3.0\lib\net46\DocumentFormat.OpenXml.Framework.dll
+
+ packages\DocumentFormat.OpenXml.Framework.3.4.1\lib\net46\DocumentFormat.OpenXml.Framework.dll
packages\ExcelNumberFormat.1.1.0\lib\net20\ExcelNumberFormat.dll
@@ -152,68 +152,68 @@
packages\log4net.3.2.0\lib\net462\log4net.dll
-
- packages\Microsoft.Bcl.AsyncInterfaces.10.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll
+
+ packages\Microsoft.Bcl.AsyncInterfaces.10.0.2\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll
-
- packages\Microsoft.Bcl.Cryptography.10.0.0\lib\net462\Microsoft.Bcl.Cryptography.dll
+
+ packages\Microsoft.Bcl.Cryptography.10.0.2\lib\net462\Microsoft.Bcl.Cryptography.dll
packages\Microsoft.Bcl.HashCode.6.0.0\lib\net462\Microsoft.Bcl.HashCode.dll
-
- packages\Microsoft.Extensions.DependencyInjection.10.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll
+
+ packages\Microsoft.Extensions.DependencyInjection.10.0.2\lib\net462\Microsoft.Extensions.DependencyInjection.dll
-
- packages\Microsoft.Extensions.DependencyInjection.Abstractions.10.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll
+
+ packages\Microsoft.Extensions.DependencyInjection.Abstractions.10.0.2\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll
-
- packages\Microsoft.Extensions.Logging.10.0.0\lib\net462\Microsoft.Extensions.Logging.dll
+
+ packages\Microsoft.Extensions.Logging.10.0.2\lib\net462\Microsoft.Extensions.Logging.dll
-
- packages\Microsoft.Extensions.Logging.Abstractions.10.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll
+
+ packages\Microsoft.Extensions.Logging.Abstractions.10.0.2\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll
-
- packages\Microsoft.Extensions.Options.10.0.0\lib\net462\Microsoft.Extensions.Options.dll
+
+ packages\Microsoft.Extensions.Options.10.0.2\lib\net462\Microsoft.Extensions.Options.dll
-
- packages\Microsoft.Extensions.Primitives.10.0.0\lib\net462\Microsoft.Extensions.Primitives.dll
+
+ packages\Microsoft.Extensions.Primitives.10.0.2\lib\net462\Microsoft.Extensions.Primitives.dll
-
- packages\PDFsharp-MigraDoc.6.2.3\lib\netstandard2.0\MigraDoc.DocumentObjectModel.dll
+
+ packages\PDFsharp-MigraDoc.6.2.4\lib\netstandard2.0\MigraDoc.DocumentObjectModel.dll
-
- packages\PDFsharp-MigraDoc.6.2.3\lib\netstandard2.0\MigraDoc.Rendering.dll
+
+ packages\PDFsharp-MigraDoc.6.2.4\lib\netstandard2.0\MigraDoc.Rendering.dll
-
- packages\PDFsharp-MigraDoc.6.2.3\lib\netstandard2.0\MigraDoc.RtfRendering.dll
+
+ packages\PDFsharp-MigraDoc.6.2.4\lib\netstandard2.0\MigraDoc.RtfRendering.dll
-
- packages\PDFsharp.6.2.3\lib\netstandard2.0\PdfSharp.dll
+
+ packages\PDFsharp.6.2.4\lib\netstandard2.0\PdfSharp.dll
-
- packages\PDFsharp.6.2.3\lib\netstandard2.0\PdfSharp.BarCodes.dll
+
+ packages\PDFsharp.6.2.4\lib\netstandard2.0\PdfSharp.BarCodes.dll
-
- packages\PDFsharp.6.2.3\lib\netstandard2.0\PdfSharp.Charting.dll
+
+ packages\PDFsharp.6.2.4\lib\netstandard2.0\PdfSharp.Charting.dll
-
- packages\PDFsharp.6.2.3\lib\netstandard2.0\PdfSharp.Cryptography.dll
+
+ packages\PDFsharp.6.2.4\lib\netstandard2.0\PdfSharp.Cryptography.dll
-
- packages\PDFsharp.6.2.3\lib\netstandard2.0\PdfSharp.Quality.dll
+
+ packages\PDFsharp.6.2.4\lib\netstandard2.0\PdfSharp.Quality.dll
-
- packages\PDFsharp.6.2.3\lib\netstandard2.0\PdfSharp.Shared.dll
+
+ packages\PDFsharp.6.2.4\lib\netstandard2.0\PdfSharp.Shared.dll
-
- packages\PDFsharp.6.2.3\lib\netstandard2.0\PdfSharp.Snippets.dll
+
+ packages\PDFsharp.6.2.4\lib\netstandard2.0\PdfSharp.Snippets.dll
-
- packages\PDFsharp.6.2.3\lib\netstandard2.0\PdfSharp.System.dll
+
+ packages\PDFsharp.6.2.4\lib\netstandard2.0\PdfSharp.System.dll
-
- packages\PDFsharp.6.2.3\lib\netstandard2.0\PdfSharp.WPFonts.dll
+
+ packages\PDFsharp.6.2.4\lib\netstandard2.0\PdfSharp.WPFonts.dll
packages\RBush.Signed.4.0.0\lib\net47\RBush.dll
@@ -231,12 +231,12 @@
packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\lib\net46\System.Data.SQLite.dll
-
- packages\System.Diagnostics.DiagnosticSource.10.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll
+
+ packages\System.Diagnostics.DiagnosticSource.10.0.2\lib\net462\System.Diagnostics.DiagnosticSource.dll
-
- packages\System.Formats.Asn1.10.0.0\lib\net462\System.Formats.Asn1.dll
+
+ packages\System.Formats.Asn1.10.0.2\lib\net462\System.Formats.Asn1.dll
@@ -251,8 +251,8 @@
-
- packages\System.Security.Cryptography.Pkcs.10.0.0\lib\net462\System.Security.Cryptography.Pkcs.dll
+
+ packages\System.Security.Cryptography.Pkcs.10.0.2\lib\net462\System.Security.Cryptography.Pkcs.dll
@@ -261,6 +261,7 @@
packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll
+
@@ -329,6 +330,9 @@
ValueMappingsControl.xaml
+
+ WASExemptionsControl.xaml
+
ChangePasswordDialog.xaml
@@ -645,6 +649,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/ENI2/MainWindow.xaml b/ENI2/MainWindow.xaml
index e71b66a4..94750ceb 100644
--- a/ENI2/MainWindow.xaml
+++ b/ENI2/MainWindow.xaml
@@ -92,7 +92,18 @@
-
+
diff --git a/ENI2/MainWindow.xaml.cs b/ENI2/MainWindow.xaml.cs
index d8d4cd0f..089bc403 100644
--- a/ENI2/MainWindow.xaml.cs
+++ b/ENI2/MainWindow.xaml.cs
@@ -40,7 +40,8 @@ namespace ENI2
private readonly SucheControl sucheControl;
private CompareExcelDialog compareExcelDialog;
private EasyPeasyControl easyPeasyControl;
-
+ private WASExemptionsControl wasExemptionsControl;
+
private bool dbConnected;
private readonly ScaleTransform _transform = new ScaleTransform(1.0, 1.0);
private readonly Dictionary openTabs = new Dictionary();
@@ -284,12 +285,12 @@ namespace ENI2
_selectedMenuItem = mi;
_selectedMenuItem.Background = Brushes.LightBlue;
- if(sender == this.menuItemNotifications)
+ if (sender == this.menuItemNotifications)
{
this.rootContainer.Children.Add(this.mainFrame);
-
+
}
- else if(sender == this.menuItemUserAdministration)
+ else if (sender == this.menuItemUserAdministration)
{
if (this.rpControl == null)
{
@@ -299,7 +300,7 @@ namespace ENI2
}
this.rootContainer.Children.Add(this.rpControl);
}
- else if(sender == this.menuItemMaersk)
+ else if (sender == this.menuItemMaersk)
{
if (this.moControl == null)
{
@@ -309,29 +310,37 @@ namespace ENI2
}
this.rootContainer.Children.Add(moControl);
}
- else if(sender == this.menuItemStatus)
+ else if (sender == this.menuItemStatus)
{
- if(this.statusControl == null)
+ if (this.statusControl == null)
{
this.statusControl = new ServerStatusControl();
}
this.rootContainer.Children.Add(this.statusControl);
}
- else if(sender == this.menuItemValueMappings)
+ else if (sender == this.menuItemValueMappings)
{
- if(this.vmControl == null)
+ if (this.vmControl == null)
{
this.vmControl = new ValueMappingsControl();
}
this.rootContainer.Children.Add(this.vmControl);
}
- else if(sender == this.menuItemEasyPeasy)
+ else if (sender == this.menuItemEasyPeasy)
{
- if(this.easyPeasyControl == null)
+ if (this.easyPeasyControl == null)
{
this.easyPeasyControl = new EasyPeasyControl();
}
- this.rootContainer.Children.Add(this.easyPeasyControl);
+ this.rootContainer.Children.Add(this.easyPeasyControl);
+ }
+ else if (sender == this.menuItemWASExemptions)
+ {
+ if(this.wasExemptionsControl == null)
+ {
+ this.wasExemptionsControl = new WASExemptionsControl();
+ }
+ this.rootContainer.Children.Add(this.wasExemptionsControl);
}
}
@@ -704,7 +713,7 @@ namespace ENI2
this.menuItemEasyPeasy.Visibility = Visibility.Visible;
if (this.userEntity.IsAdmin)
{
- this.menuItemUserAdministration.Visibility = Visibility.Visible;
+ this.menuItemAdmin.Visibility = Visibility.Visible;
this.sucheControl.AdminMode = true;
}
this.menuItemValueMappings.Visibility = this.userEntity.IsEditor ? Visibility.Visible : Visibility.Hidden;
@@ -763,8 +772,8 @@ namespace ENI2
}
}
- #endregion
+ #endregion
}
}
diff --git a/ENI2/Properties/Resources.Designer.cs b/ENI2/Properties/Resources.Designer.cs
index e423d5a4..48f71e7b 100644
--- a/ENI2/Properties/Resources.Designer.cs
+++ b/ENI2/Properties/Resources.Designer.cs
@@ -6327,6 +6327,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to WAS exemptions.
+ ///
+ public static string textWASExemptions {
+ get {
+ return ResourceManager.GetString("textWASExemptions", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Waste.
///
diff --git a/ENI2/Properties/Resources.resx b/ENI2/Properties/Resources.resx
index bf0d9719..0681e5df 100644
--- a/ENI2/Properties/Resources.resx
+++ b/ENI2/Properties/Resources.resx
@@ -2268,4 +2268,7 @@ Proceed?
Easy Peasy 🍋
+
+ WAS exemptions
+
\ No newline at end of file
diff --git a/ENI2/packages.config b/ENI2/packages.config
index a8b21ac6..b5c1be0f 100644
--- a/ENI2/packages.config
+++ b/ENI2/packages.config
@@ -2,33 +2,33 @@
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
+
\ No newline at end of file
diff --git a/SQL/Update_To_7.2.15.sql b/SQL/Update_To_7.2.15.sql
new file mode 100644
index 00000000..cd04457e
--- /dev/null
+++ b/SQL/Update_To_7.2.15.sql
@@ -0,0 +1,17 @@
+
+
+PRINT N'Creating [dbo].[WASExemption] if missing...';
+GO
+IF OBJECT_ID(N'dbo.WASExemption', N'U') IS NULL
+BEGIN
+ CREATE TABLE [dbo].[WASExemption] (
+ [Id] UNIQUEIDENTIFIER NOT NULL,
+ [IMO] NCHAR (7) NOT NULL,
+ [ShipName] NVARCHAR (100) NULL,
+ [Port] NCHAR (70) NOT NULL,
+ [ValidUntil] DATETIME NOT NULL,
+ PRIMARY KEY CLUSTERED ([Id] ASC)
+ );
+ PRINT N'Table [dbo].[WASExemption] created.';
+END
+GO
diff --git a/bsmd.database/WASExemption.cs b/bsmd.database/WASExemption.cs
new file mode 100644
index 00000000..9ccf420d
--- /dev/null
+++ b/bsmd.database/WASExemption.cs
@@ -0,0 +1,130 @@
+// Copyright (c) 2026-present schick Informatik
+// Description: WAS Exemption entries
+
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+
+namespace bsmd.database
+{
+ public class WASExemption : DatabaseEntityAsync, IComparable
+ {
+ #region Construction
+
+ public WASExemption()
+ {
+ this.tablename = "[dbo].[WASExemption]";
+ }
+
+ #endregion
+
+ #region Properties
+
+ [MaxLength(7)]
+ public string IMO { get; set; }
+
+ [MaxLength(100)]
+ public string ShipName { get; set; }
+
+ [MaxLength(70)]
+ public string Port { get; set; }
+
+ public DateTime ValidUntil { get; set; }
+
+ #endregion
+
+ #region DatabaseEntity implementation
+
+ public override void PrepareSave(IDbCommand cmd)
+ {
+ SqlCommand scmd = cmd as SqlCommand;
+
+ if (this.IMO != null) scmd.Parameters.AddWithValue("@P1", this.IMO);
+ else scmd.Parameters.AddWithValue("@P1", DBNull.Value);
+ if (this.ShipName != null) scmd.Parameters.AddWithValue("@P2", this.ShipName);
+ else scmd.Parameters.AddWithValue("@P2", DBNull.Value);
+ if (this.Port != null) scmd.Parameters.AddWithValue("@P3", this.Port);
+ else scmd.Parameters.AddWithValue("@P3", DBNull.Value);
+ scmd.Parameters.AddWithValue("@P4", this.ValidUntil);
+
+ if (this.IsNew)
+ {
+ this.CreateId();
+ scmd.Parameters.AddWithValue("@ID", this.Id);
+ cmd.CommandText = string.Format(
+ "INSERT INTO {0} (Id, IMO, ShipName, Port, ValidUntil) VALUES (@ID, @P1, @P2, @P3, @P4)",
+ this.Tablename);
+ }
+ else
+ {
+ cmd.CommandText = string.Format(
+ "UPDATE {0} SET IMO = @P1, ShipName = @P2, Port = @P3, ValidUntil = @P4 WHERE Id = @ID",
+ this.Tablename);
+ scmd.Parameters.AddWithValue("@ID", this.Id);
+ }
+ }
+
+ public override void PrepareLoadCommand(IDbCommand cmd, Message.LoadFilter filter, params object[] criteria)
+ {
+ string query = string.Format("SELECT Id, IMO, ShipName, Port, ValidUntil FROM {0}", this.Tablename);
+
+ switch (filter)
+ {
+ case Message.LoadFilter.ALL:
+ default:
+ break;
+ }
+ cmd.CommandText = query;
+ }
+
+ public override List LoadList(IDataReader reader)
+ {
+ List result = new List();
+
+ while (reader.Read())
+ {
+ WASExemption was = new WASExemption();
+ was.id = reader.GetGuid(0);
+ if (!reader.IsDBNull(1)) was.IMO = reader.GetString(1);
+ if (!reader.IsDBNull(2)) was.ShipName = reader.GetString(2);
+ if (!reader.IsDBNull(3)) was.Port = reader.GetString(3);
+ if (!reader.IsDBNull(4)) was.ValidUntil = reader.GetDateTime(4);
+
+ result.Add(was);
+ }
+ reader.Close();
+ return result;
+ }
+
+ protected override DatabaseEntityAsync ReadRowFromReader(IDataReader reader)
+ {
+ WASExemption was = null;
+ if (reader != null)
+ {
+ was = new WASExemption();
+ was.id = reader.GetGuid(0);
+ if (!reader.IsDBNull(1)) was.IMO = reader.GetString(1);
+ if (!reader.IsDBNull(2)) was.ShipName = reader.GetString(2);
+ if (!reader.IsDBNull(3)) was.Port = reader.GetString(3);
+ if (!reader.IsDBNull(4)) was.ValidUntil = reader.GetDateTime(4);
+ }
+ return was;
+ }
+
+ #endregion
+
+ #region IComparable implementation
+
+ public int CompareTo(object obj)
+ {
+ if (obj is WASExemption exemption)
+ {
+ return this.ShipName?.CompareTo(exemption.ShipName ?? "") ?? 0;
+ }
+ return 0;
+ }
+
+ #endregion
+ }
+}
diff --git a/bsmd.database/bsmd.database.csproj b/bsmd.database/bsmd.database.csproj
index 27c20bb7..e7cae5ee 100644
--- a/bsmd.database/bsmd.database.csproj
+++ b/bsmd.database/bsmd.database.csproj
@@ -193,8 +193,9 @@
-
-
+
+
+
@@ -219,4 +220,4 @@
-->
-
\ No newline at end of file
+