diff --git a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs
index 81d80ccd..1498a3dc 100644
--- a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs
@@ -773,7 +773,7 @@ namespace ENI2
DateTime comparison;
if (noanod.ETDFromLastPort.HasValue) comparison = noanod.ETDFromLastPort.Value.ToLocalTime().Date;
else comparison = DateTime.Now.Date;
- if(sec.LastTenPortFacilitesCalled[0].PortFacilityDateOfDeparture != comparison)
+ if((sec.LastTenPortFacilitesCalled[0].PortFacilityDateOfDeparture == null) || (sec.LastTenPortFacilitesCalled[0].PortFacilityDateOfDeparture != comparison))
{
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "SEC last port departure doesn't match NOANOD ETDFromLastPort", null, "Last port departure mismatch", null, "SEC");
mv.MessageGroupName = Properties.Resources.textOverview;
diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj
index e4bf4cd6..ab5f3637 100644
--- a/ENI-2/ENI2/ENI2/ENI2.csproj
+++ b/ENI-2/ENI2/ENI2/ENI2.csproj
@@ -34,8 +34,8 @@
5.4.0.0
true
publish.html
- 1
- 6.1.1.%2a
+ 0
+ 6.2.0.%2a
false
true
true
diff --git a/ENI-2/ENI2/ENI2/MainWindow.xaml.cs b/ENI-2/ENI2/ENI2/MainWindow.xaml.cs
index 724dded6..96834af1 100644
--- a/ENI-2/ENI2/ENI2/MainWindow.xaml.cs
+++ b/ENI-2/ENI2/ENI2/MainWindow.xaml.cs
@@ -484,6 +484,9 @@ namespace ENI2
// Meldeklassen für neuen Anlauf erzeugen:
bsmd.database.Util.CreateMessagesForCore(newCore, null, userEntity);
this.AnmeldungenControl_MessageCoreSelected(newCore); // 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);
}
}
diff --git a/ENI-2/ENI2/ENI2/SucheControl.xaml b/ENI-2/ENI2/ENI2/SucheControl.xaml
index b5f362ac..b4b03d58 100644
--- a/ENI-2/ENI2/ENI2/SucheControl.xaml
+++ b/ENI-2/ENI2/ENI2/SucheControl.xaml
@@ -16,20 +16,20 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -37,32 +37,32 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
+
+
@@ -92,6 +92,7 @@
+
diff --git a/ENI-2/ENI2/ENI2/SucheControl.xaml.cs b/ENI-2/ENI2/ENI2/SucheControl.xaml.cs
index 52bdac25..5d935a60 100644
--- a/ENI-2/ENI2/ENI2/SucheControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/SucheControl.xaml.cs
@@ -21,11 +21,16 @@ namespace ENI2
///
public partial class SucheControl : UserControl
{
+
+ #region Fields
+
private List anmeldungen = new List();
private readonly object searchLock = new object();
private readonly ILog _log = LogManager.GetLogger("SucheControl");
private MenuItem cancelItem;
+ #endregion
+
#region Construction
public SucheControl()
diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx
index 261ceef7..f5dc69ff 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 5ad44df1..d91dcce5 100644
--- a/nsw/Source/bsmd.ExcelReadService/Util.cs
+++ b/nsw/Source/bsmd.ExcelReadService/Util.cs
@@ -1976,6 +1976,21 @@ namespace bsmd.ExcelReadService
private static void ScanTOWA(List messages, MessageCore messageCore, ExcelReader reader)
{
Message towaMessage = Util.GetMessageWithType(messages, messageCore, Message.NotificationClass.TOWA);
+
+ // 24.4.21: TOWA beim Excel import
+ bool hasTOWAMarker = false;
+ for (int i = 1; i <= towaMessage.NumberOfExcelRows; i++)
+ {
+ string tName = string.Format("TOWA.TowageOnArrivalName_{0}", i);
+ string towageName = reader.ReadText(tName);
+ if (!towageName.IsNullOrEmpty())
+ {
+ hasTOWAMarker = true;
+ break;
+ }
+ }
+ if (!hasTOWAMarker) return; // no TOWA info on sheet
+
towaMessage.DeleteElements();
for (int i = 1; i <= towaMessage.NumberOfExcelRows; i++)
{
@@ -2021,6 +2036,21 @@ namespace bsmd.ExcelReadService
private static void ScanTOWD(List messages, MessageCore messageCore, ExcelReader reader)
{
Message towdMessage = Util.GetMessageWithType(messages, messageCore, Message.NotificationClass.TOWD);
+
+ // 24.4.21: TOWD beim Excel import
+ bool hasTOWDMarker = false;
+ for (int i = 1; i <= towdMessage.NumberOfExcelRows; i++)
+ {
+ string tName = string.Format("TOWD.TowageOnDepartureName_{0}", i);
+ string towageName = reader.ReadText(tName);
+ if (!towageName.IsNullOrEmpty())
+ {
+ hasTOWDMarker = true;
+ break;
+ }
+ }
+ if (!hasTOWDMarker) return; // no TOWD info on sheet
+
towdMessage.DeleteElements();
for (int i = 1; i <= towdMessage.NumberOfExcelRows; i++)
diff --git a/nsw/Source/bsmd.database/DBManager.cs b/nsw/Source/bsmd.database/DBManager.cs
index 720dc281..759f33ed 100644
--- a/nsw/Source/bsmd.database/DBManager.cs
+++ b/nsw/Source/bsmd.database/DBManager.cs
@@ -266,6 +266,7 @@ namespace bsmd.database
this.LoadETA_ETD(core);
this.LoadATA(core);
this.LoadATD(core);
+ this.LoadNumberSent(core);
result.Add(core);
}
@@ -1359,6 +1360,22 @@ namespace bsmd.database
}
}
+ internal void LoadNumberSent(MessageCore core)
+ {
+ if (core == null) return;
+ using (SqlCommand cmd = new SqlCommand())
+ {
+ cmd.CommandText = "SELECT COUNT(*) FROM MessageHeader WHERE MessageHeader.MessageCoreId = @ID";
+ cmd.Parameters.AddWithValue("@ID", core.Id);
+ int total = this.PerformReadIntQuery(cmd) ?? 0;
+
+ cmd.CommandText = "SELECT COUNT(*) FROM MessageHeader WHERE MessageHeader.MessageCoreId = @ID AND MessageHeader.BSMDStatus = 3";
+ int sent = this.PerformReadIntQuery(cmd) ?? 0;
+
+ core.NumberSent = string.Format("{0}/{1}", sent, total);
+ }
+ }
+
#endregion
#region DB access methods
diff --git a/nsw/Source/bsmd.database/MessageCore.cs b/nsw/Source/bsmd.database/MessageCore.cs
index 999943c5..013f2d6c 100644
--- a/nsw/Source/bsmd.database/MessageCore.cs
+++ b/nsw/Source/bsmd.database/MessageCore.cs
@@ -329,6 +329,11 @@ namespace bsmd.database
///
public bool IsHighlighted { get; set; }
+ ///
+ /// ENI helper, # of notif. classes already sent vs total number (e.g. 18/27)
+ ///
+ public string NumberSent { get; set; }
+
#endregion
#region Felder um NSW Statusinformationen zu speichern (abgefragte Daten!)
diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs
index b412bb36..d3d7fd93 100644
--- a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs
+++ b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs
@@ -2,6 +2,6 @@
[assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")]
-[assembly: AssemblyInformationalVersion("6.1.1")]
+[assembly: AssemblyInformationalVersion("6.2.0")]
[assembly: AssemblyCopyright("Copyright © 2014-2021 schick Informatik")]
[assembly: AssemblyTrademark("")]
\ No newline at end of file
diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs
index 9d6d2f97..051a2732 100644
--- a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs
+++ b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs
@@ -1,4 +1,4 @@
using System.Reflection;
-[assembly: AssemblyVersion("6.1.1.*")]
+[assembly: AssemblyVersion("6.2.0.*")]
diff --git a/nsw/Source/misc/db.sqlite b/nsw/Source/misc/db.sqlite
index 9390e8b9..f9050a71 100644
Binary files a/nsw/Source/misc/db.sqlite and b/nsw/Source/misc/db.sqlite differ