diff --git a/AIS/AIS.Bereinigung.png b/AIS/AIS.Bereinigung.png
new file mode 100644
index 00000000..9d235b43
Binary files /dev/null and b/AIS/AIS.Bereinigung.png differ
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml
index 474df95d..0463b64d 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml
@@ -35,7 +35,8 @@
-
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml.cs
index eb92f5e0..b351e734 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml.cs
@@ -27,7 +27,9 @@ namespace ENI2.DetailViewControls
private Message _crewdMessage;
private Message _pasMessage;
private Message _pasdMessage;
+ private Message _secMessage;
private BPOL _bpol;
+ private SEC _sec;
public BorderPoliceDetailControl()
{
@@ -54,6 +56,13 @@ namespace ENI2.DetailViewControls
if (aMessage.MessageNotificationClass == Message.NotificationClass.PAS) { this._pasMessage = aMessage; this.ControlMessages.Add(aMessage); }
if (aMessage.MessageNotificationClass == Message.NotificationClass.CREWD) { this._crewdMessage = aMessage; this.ControlMessages.Add(aMessage); }
if (aMessage.MessageNotificationClass == Message.NotificationClass.PASD) { this._pasdMessage = aMessage; this.ControlMessages.Add(aMessage); }
+
+ if (aMessage.MessageNotificationClass == Message.NotificationClass.SEC)
+ {
+ this._secMessage = aMessage;
+ if (this._secMessage.Elements.Count > 0) this._sec = this._secMessage.Elements[0] as SEC;
+ }
+
}
#region init BPOL
@@ -210,6 +219,39 @@ namespace ENI2.DetailViewControls
this.DataGridPortOfItinerary_CreateRequested();
}
+ private void buttonImportFromSEC_Click(object sender, RoutedEventArgs e)
+ {
+ if (this._bpol.PortOfItineraries.Count > 0)
+ {
+ MessageBox.Show(Properties.Resources.textOnlyIfGridIsEmpty, Properties.Resources.textCaptionError, MessageBoxButton.OK, MessageBoxImage.Warning);
+ }
+ else
+ {
+ if (this._sec != null)
+ {
+ foreach (LastTenPortFacilitiesCalled l10fc in _sec.LastTenPortFacilitesCalled)
+ {
+ if (l10fc.PortFacilityDateOfDeparture.HasValue &&
+ ((DateTime.Now - l10fc.PortFacilityDateOfDeparture.Value).TotalDays < 31))
+ {
+ PortOfItinerary poi = new PortOfItinerary();
+ poi.Identifier = PortOfItinerary.GetNewIdentifier(this._bpol.PortOfItineraries);
+ poi.BPOL = this._bpol;
+ poi.PortOfItineraryETA = l10fc.PortFacilityDateOfArrival;
+ poi.PortOfItineraryLocode = l10fc.PortFacilityPortLoCode;
+ poi.PortOfItineraryName = l10fc.PortFacilityPortName;
+ this._bpol.PortOfItineraries.Add(poi);
+ }
+ }
+ if (this._bpol.PortOfItineraries.Count > 0)
+ {
+ this.dataGridPortOfItinerary.Items.Refresh();
+ this.SublistElementChanged(Message.NotificationClass.BPOL);
+ }
+ }
+ }
+ }
+
#endregion
#region passenger grid
@@ -495,8 +537,8 @@ namespace ENI2.DetailViewControls
PAS pas = new PAS();
if (reader.IsDBNull(0) && reader.IsDBNull(1)) continue;
- if (!reader.IsDBNull(0)) pas.PassengerLastName = reader.GetString(0);
- if (!reader.IsDBNull(1)) pas.PassengerFirstName = reader.GetString(1);
+ if (!reader.IsDBNull(0)) pas.PassengerLastName = reader.GetValue(0).ToString();
+ if (!reader.IsDBNull(1)) pas.PassengerFirstName = reader.GetValue(1).ToString();
if (!reader.IsDBNull(2)) pas.PassengerGender = GlobalStructures.ParseGender(reader.GetString(2));
if (!reader.IsDBNull(3)) pas.PassengerNationality = reader.GetString(3).Substring(0, 2).ToUpper();
if (!reader.IsDBNull(4)) pas.PassengerPortOfEmbarkation = reader.GetString(4);
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml.cs
index d9a9d87f..981eb20d 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/MaritimeHealthDeclarationDetailControl.xaml.cs
@@ -240,7 +240,7 @@ namespace ENI2.DetailViewControls
{
if(this._mdh.PortOfCallLast30Days.Count > 0)
{
- MessageBox.Show(Properties.Resources.textOnlyIfGridIsEmpty, Properties.Resources.textCaptionError, MessageBoxButton.OK, MessageBoxImage.Warning);
+ MessageBox.Show(Properties.Resources.textOnlyIfGridIsEmpty, Properties.Resources.textCaptionError, MessageBoxButton.OK, MessageBoxImage.Warning);
}
else
{
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/WasteDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/WasteDetailControl.xaml.cs
index 082e719e..c8f4a6cf 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/WasteDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/WasteDetailControl.xaml.cs
@@ -262,7 +262,11 @@ namespace ENI2.DetailViewControls
if (!reader.IsDBNull(1)) o = reader.GetValue(1); else o = null;
- if (o != null) waste.WasteType = Convert.ToInt32(o);
+ if (o != null)
+ {
+ waste.WasteType = Convert.ToInt32(o);
+ if (waste.WasteType == 2313) waste.WasteType = 2600;
+ }
if (!reader.IsDBNull(3)) waste.WasteDescription = reader.GetString(3);
@@ -303,7 +307,7 @@ namespace ENI2.DetailViewControls
this.dataGridWaste.Items.Refresh();
this.SublistElementChanged(Message.NotificationClass.SEC);
MessageBox.Show(String.Format(Properties.Resources.textWasteImported, importWasteList.Count), Properties.Resources.textCaptionInformation, MessageBoxButton.OK, MessageBoxImage.Information);
- }
+ }
}
stream.Close();
diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj
index be5587b7..86d5d534 100644
--- a/ENI-2/ENI2/ENI2/ENI2.csproj
+++ b/ENI-2/ENI2/ENI2/ENI2.csproj
@@ -35,8 +35,8 @@
3.5.1.0
true
publish.html
- 2
- 5.0.10.%2a
+ 1
+ 5.0.11.%2a
false
true
true
@@ -124,23 +124,23 @@
-
- packages\Extended.Wpf.Toolkit.3.3.0\lib\net40\Xceed.Wpf.AvalonDock.dll
+
+ packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.dll
-
- packages\Extended.Wpf.Toolkit.3.3.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll
+
+ packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll
-
- packages\Extended.Wpf.Toolkit.3.3.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll
+
+ packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll
-
- packages\Extended.Wpf.Toolkit.3.3.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll
+
+ packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll
-
- packages\Extended.Wpf.Toolkit.3.3.0\lib\net40\Xceed.Wpf.DataGrid.dll
+
+ packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.DataGrid.dll
-
- packages\Extended.Wpf.Toolkit.3.3.0\lib\net40\Xceed.Wpf.Toolkit.dll
+
+ packages\Extended.Wpf.Toolkit.3.2.0\lib\net40\Xceed.Wpf.Toolkit.dll
diff --git a/ENI-2/ENI2/ENI2/LocalizedLookup.cs b/ENI-2/ENI2/ENI2/LocalizedLookup.cs
index 69313934..37ddc170 100644
--- a/ENI-2/ENI2/ENI2/LocalizedLookup.cs
+++ b/ENI-2/ENI2/ENI2/LocalizedLookup.cs
@@ -64,10 +64,11 @@ namespace ENI2
public static bool PortAreaExists(string locode, string portArea)
{
+ if (locode.IsNullOrEmpty() || portArea.IsNullOrEmpty()) return false;
string query = string.Format("SELECT COUNT(*) FROM INFO_PortArea WHERE Locode = '{0}' AND Code = '{1}'", locode, portArea);
SQLiteCommand cmd = new SQLiteCommand(query, _con);
long numResults = (long) cmd.ExecuteScalar();
- return (numResults > 0);
+ return numResults > 0;
}
public static Dictionary getNationalities()
diff --git a/ENI-2/ENI2/ENI2/packages.config b/ENI-2/ENI2/ENI2/packages.config
index 307e211a..bbf31f64 100644
--- a/ENI-2/ENI2/ENI2/packages.config
+++ b/ENI-2/ENI2/ENI2/packages.config
@@ -4,7 +4,7 @@ Sample license text.
-->
-
+
\ No newline at end of file
diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx
index a623c368..155de5a6 100644
Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ
diff --git a/nsw/Source/bsmd.ExcelReadService/LocodeDB.cs b/nsw/Source/bsmd.ExcelReadService/LocodeDB.cs
index 30a07023..fcbf524f 100644
--- a/nsw/Source/bsmd.ExcelReadService/LocodeDB.cs
+++ b/nsw/Source/bsmd.ExcelReadService/LocodeDB.cs
@@ -19,7 +19,7 @@ namespace bsmd.ExcelReadService
/// Locodes suchen (zu Orten), die DB ist aus einem github Projekt:
/// https://github.com/kabisa/un_locode
///
- public class LocodeDB
+ public static class LocodeDB
{
private static SQLiteConnection _con;
private const string _locode_DB_NAME = "db.sqlite";
@@ -202,10 +202,10 @@ namespace bsmd.ExcelReadService
public string Locode { get; set; }
public string Name { get; set; }
- public int CompareTo(object otherLocode)
+ public int CompareTo(object obj)
{
- if (otherLocode is LocodeEntry)
- return Locode.CompareTo(((LocodeEntry)otherLocode).Locode);
+ if (obj is LocodeEntry)
+ return Locode.CompareTo(((LocodeEntry)obj).Locode);
else
return 0;
}
diff --git a/nsw/Source/bsmd.database/INFO.cs b/nsw/Source/bsmd.database/INFO.cs
index 57140b88..883da3f9 100644
--- a/nsw/Source/bsmd.database/INFO.cs
+++ b/nsw/Source/bsmd.database/INFO.cs
@@ -196,7 +196,7 @@ namespace bsmd.database
public override void Validate(List errors, List violations)
{
- if ((PortArea != null) && (PortArea.Length >= 2) && (PortArea.Length <= 4))
+ if ((PortArea?.Length >= 2) && (PortArea.Length <= 4))
{
if ((RuleEngine.PortAreaChecker != null) && (this.MessageCore != null))
if (!RuleEngine.PortAreaChecker(this.MessageCore.PoC, this.PortArea))
diff --git a/nsw/Source/bsmd.database/PAS.cs b/nsw/Source/bsmd.database/PAS.cs
index 41e78631..ea8542f3 100644
--- a/nsw/Source/bsmd.database/PAS.cs
+++ b/nsw/Source/bsmd.database/PAS.cs
@@ -98,14 +98,14 @@ namespace bsmd.database
[ShowReport]
[ReportDisplayName("Port of embarkation")]
- [Validation(ValidationCode.NOT_NULL)]
+ [Validation(ValidationCode.LOCODE)]
[MaxLength(5)]
[ENI2Validation]
public string PassengerPortOfEmbarkation { get; set; }
[ShowReport]
[ReportDisplayName("Port of disembarkation")]
- [Validation(ValidationCode.NOT_NULL)]
+ [Validation(ValidationCode.LOCODE)]
[MaxLength(5)]
[ENI2Validation]
public string PassengerPortOfDisembarkation { get; set; }
diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs
index 11d58cf1..893b7e74 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("5.0.9")]
+[assembly: AssemblyInformationalVersion("5.0.11")]
[assembly: AssemblyCopyright("Copyright © 2014-2018 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 f8e3d142..a2ac3476 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("5.0.9.*")]
+[assembly: AssemblyVersion("5.0.11.*")]
diff --git a/nsw/Source/bsmd.database/STAT.cs b/nsw/Source/bsmd.database/STAT.cs
index 76caa065..805316aa 100644
--- a/nsw/Source/bsmd.database/STAT.cs
+++ b/nsw/Source/bsmd.database/STAT.cs
@@ -68,7 +68,7 @@ namespace bsmd.database
public int? GrossTonnage { get; set; }
[ShowReport]
- [Validation(ValidationCode.LOCODE_NOPORT)]
+ [Validation(ValidationCode.LOCODE_NOPORT)]
[MaxLength(5)]
[ENI2Validation]
public string PortOfRegistry { get; set; }
diff --git a/nsw/Source/bsmd.database/XtraSendLogic.cs b/nsw/Source/bsmd.database/XtraSendLogic.cs
index bdb09222..7e7916c9 100644
--- a/nsw/Source/bsmd.database/XtraSendLogic.cs
+++ b/nsw/Source/bsmd.database/XtraSendLogic.cs
@@ -41,6 +41,7 @@ namespace bsmd.database
(message.MessageNotificationClass == Message.NotificationClass.SERV) ||
(message.MessageNotificationClass == Message.NotificationClass.WAS) ||
(message.MessageNotificationClass == Message.NotificationClass.TOWD) ||
+ (message.MessageNotificationClass == Message.NotificationClass.HAZD) || // hinzugefügt nach Trello Karte 26.6.18
(message.MessageNotificationClass == Message.NotificationClass.STO))
{
message.StatusInfo = "Meldeklasse bei Transitmeldung nicht versandt";
diff --git a/nsw/Source/bsmd.hisnord/Response.cs b/nsw/Source/bsmd.hisnord/Response.cs
index f03f0083..512160c3 100644
--- a/nsw/Source/bsmd.hisnord/Response.cs
+++ b/nsw/Source/bsmd.hisnord/Response.cs
@@ -10,7 +10,7 @@ using System.Xml.Linq;
namespace bsmd.hisnord
{
- public class Response
+ public static class Response
{
private static ILog _log = LogManager.GetLogger(typeof(Response));
diff --git a/nsw/Source/misc/db.sqlite b/nsw/Source/misc/db.sqlite
index d7a363c7..b1c2ccae 100644
Binary files a/nsw/Source/misc/db.sqlite and b/nsw/Source/misc/db.sqlite differ