diff --git a/ENI-2/ENI2/ENI2/App.config b/ENI-2/ENI2/ENI2/App.config
index 0b733dcc..41adfc61 100644
--- a/ENI-2/ENI2/ENI2/App.config
+++ b/ENI-2/ENI2/ENI2/App.config
@@ -26,12 +26,12 @@
1000
-
- http://heupferd/bsmd.LockingService/LockingService.svc
+ http://192.168.2.24/LockingService/LockingService.svc
+
-
- Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=E:\DATA\DB\NSW.MDF;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False
+ Initial Catalog=nsw;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/ArrivalNotificationDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/ArrivalNotificationDetailControl.xaml.cs
index 9632e6ac..059b327f 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/ArrivalNotificationDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/ArrivalNotificationDetailControl.xaml.cs
@@ -8,6 +8,8 @@ using bsmd.database;
using ENI2.EditControls;
using System.Windows.Media;
using System.Windows.Controls;
+using System.Windows.Media.Imaging;
+using System;
namespace ENI2.DetailViewControls
{
@@ -21,7 +23,7 @@ namespace ENI2.DetailViewControls
private Message _tiefaMessage;
private Message _pobaMessage;
private Message _bkraMessage;
-
+ private Message _brkdMessage;
public ArrivalNotificationDetailControl()
{
@@ -49,6 +51,7 @@ namespace ENI2.DetailViewControls
if (aMessage.MessageNotificationClass == Message.NotificationClass.TIEFA) { this._tiefaMessage = aMessage; this.ControlMessages.Add(aMessage); }
if (aMessage.MessageNotificationClass == Message.NotificationClass.POBA) { this._pobaMessage = aMessage; this.ControlMessages.Add(aMessage); }
if (aMessage.MessageNotificationClass == Message.NotificationClass.BKRA) { this._bkraMessage = aMessage; this.ControlMessages.Add(aMessage); }
+ if (aMessage.MessageNotificationClass == Message.NotificationClass.BKRD) { this._brkdMessage = aMessage; this.ControlMessages.Add(aMessage); }
}
#region ATA
@@ -135,10 +138,35 @@ namespace ENI2.DetailViewControls
this.dataGridBKRA.DeleteRequested += DataGridBKRA_DeleteRequested;
this.dataGridBKRA.CreateRequested += DataGridBKRA_CreateRequested;
+ // Extra Menüpunkt um alle Bunker Positionen nach BKRD zu kopieren
+
+ this.dataGridBKRA.ContextMenu.Items.Add(new Separator());
+ MenuItem copyBKRItem = new MenuItem();
+ copyBKRItem.Header = Properties.Resources.textCopyToBKRD;
+ copyBKRItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
+ copyBKRItem.Click += this.copyBKR;
+ this.dataGridBKRA.ContextMenu.Items.Add(copyBKRItem);
+
#endregion
}
+ private void copyBKR(object sender, RoutedEventArgs e)
+ {
+ // aus dem aktuell selektierten IBC Element ein neues IBC Element machen und nach HAZD kopieren
+
+ foreach (BRKA brka in this.dataGridBKRA.Items)
+ {
+ BRKD copyBRKD = new BRKD();
+ copyBRKD.MessageHeader = this._brkdMessage;
+ copyBRKD.CopyFromBKRA(brka);
+ copyBRKD.Identifier = DatabaseEntity.GetNewIdentifier(this._brkdMessage.Elements);
+ this._brkdMessage.Elements.Add(copyBRKD);
+ this.SublistElementChanged(Message.NotificationClass.BKRD);
+ }
+
+ }
+
#region BKRA grid events
private void DataGridBKRA_CreateRequested()
@@ -173,8 +201,7 @@ namespace ENI2.DetailViewControls
private void DataGridBKRA_DeleteRequested(DatabaseEntity obj)
{
- BRKA brka = obj as BRKA;
- if (brka != null)
+ if (obj is BRKA brka)
{
// are you sure dialog is in base class
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Delete(brka);
diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj
index 36568a76..a70528de 100644
--- a/ENI-2/ENI2/ENI2/ENI2.csproj
+++ b/ENI-2/ENI2/ENI2/ENI2.csproj
@@ -35,7 +35,7 @@
true
publish.html
1
- 5.6.0.%2a
+ 5.7.0.%2a
false
true
true
diff --git a/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs b/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
index 073e9b78..42fd7a22 100644
--- a/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
+++ b/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
@@ -1496,6 +1496,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Copy to BKRD.
+ ///
+ public static string textCopyToBKRD {
+ get {
+ return ResourceManager.GetString("textCopyToBKRD", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Copy to HAZD.
///
diff --git a/ENI-2/ENI2/ENI2/Properties/Resources.resx b/ENI-2/ENI2/ENI2/Properties/Resources.resx
index 01e788e8..08698c38 100644
--- a/ENI-2/ENI2/ENI2/Properties/Resources.resx
+++ b/ENI-2/ENI2/ENI2/Properties/Resources.resx
@@ -1432,6 +1432,9 @@
Copy to HAZD
+
+ Copy to BKRD
+
..\Resources\hand_red_card.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx
index 9deb32e4..5e40a730 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 6b368149..a8042dec 100644
--- a/nsw/Source/bsmd.ExcelReadService/Util.cs
+++ b/nsw/Source/bsmd.ExcelReadService/Util.cs
@@ -2197,10 +2197,24 @@ namespace bsmd.ExcelReadService
}
else
{
- reader.Conf.ConfirmText(lnType, ladg.CargoCodeNST, ExcelReader.ReadState.OK);
- }
- if (ladg.CargoCodeNST.IsNullOrEmpty())
- reader.Conf.ConfirmText(lnType, null, ExcelReader.ReadState.FAIL);
+ if(Int32.TryParse(ladg.CargoCodeNST, out int ccnst))
+ {
+ if ((ccnst > 0) && (ccnst < 21))
+ {
+ reader.Conf.ConfirmText(lnType, ladg.CargoCodeNST, ExcelReader.ReadState.OK);
+ }
+ else
+ {
+ reader.Conf.ConfirmText(lnType, null, ExcelReader.ReadState.WARN);
+ ladg.CargoCodeNST = null;
+ }
+ }
+ else
+ {
+ ladg.CargoCodeNST = null;
+ reader.Conf.ConfirmText(lnType, null, ExcelReader.ReadState.FAIL);
+ }
+ }
}
ladg.CargoLACode = reader.ReadCargoLACode(lnLACode);
diff --git a/nsw/Source/bsmd.database/BRKD.cs b/nsw/Source/bsmd.database/BRKD.cs
index e2067245..4f62cc2a 100644
--- a/nsw/Source/bsmd.database/BRKD.cs
+++ b/nsw/Source/bsmd.database/BRKD.cs
@@ -126,6 +126,13 @@ namespace bsmd.database
}
}
+ public void CopyFromBKRA(BRKA brka)
+ {
+ if (brka == null) return;
+ this.BunkerFuelType = brka.BunkerFuelType;
+ this.BunkerFuelQuantity_TNE = brka.BunkerFuelQuantity_TNE;
+ }
+
#endregion
}
diff --git a/nsw/Source/misc/SSN LOCODES 2019.1.xlsx b/nsw/Source/misc/SSN LOCODES 2019.1.xlsx
new file mode 100644
index 00000000..07ba0a70
Binary files /dev/null and b/nsw/Source/misc/SSN LOCODES 2019.1.xlsx differ
diff --git a/nsw/Source/misc/db.sqlite b/nsw/Source/misc/db.sqlite
index c3f258d3..8fffebab 100644
Binary files a/nsw/Source/misc/db.sqlite and b/nsw/Source/misc/db.sqlite differ
diff --git a/nsw/Source/misc/readme.md b/nsw/Source/misc/readme.md
new file mode 100644
index 00000000..734aa1e4
--- /dev/null
+++ b/nsw/Source/misc/readme.md
@@ -0,0 +1,17 @@
+# ReadMe für misc. NSW Dateien
+## PNG
+die Png's in diesem Verzeichnis waren für die ehemalige dashface Ansicht gedacht (Demo / Webanwendung). Aktuell werden sie nicht gebraucht.
+## db.sqlite
+SQLite Datenbank für alle "gepflegten" Daten, die von ENI-2 und den zugehörigen Services verwendet werden. Dazu gehört
+- SSN Locodes
+- Locodes
+- LADG Cargo Types
+- LADG Cargo handliung codes
+- LADG LA types
+- INFO Port Area
+- HAZ package types
+- Nationalities
+- Vessel types
+
+## Update SSN Locodes
+Wenn es vorkommt dass ein neues .xlsx mit SSN Locodes (oder ähnliche Excel formatierte Daten) eingelesen werden soll kann mit dem Tool "DB Browser for SQLite" die als CSV gespeicherte Datei importiert werden. Die Spaltenköpfe als Spaltennamen wählen und auf korrekte Kodierung achten. Anschließend die Tabellen einfach löschen / umbenennen oder per SQL aktualisieren.
\ No newline at end of file