diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml
index abcf9a76..5a2d8167 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml
@@ -56,7 +56,7 @@
-
+
@@ -79,7 +79,7 @@
-
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/PSC72hDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/PSC72hDetailControl.xaml.cs
index c02f49e1..b5ce9ea7 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/PSC72hDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/PSC72hDetailControl.xaml.cs
@@ -46,7 +46,18 @@ namespace ENI2.DetailViewControls
this.RegisterTextboxChange(this.textBoxPlannedOperations, Message.NotificationClass.PRE72H);
this.RegisterTextboxChange(this.textBoxPlannedWorks, Message.NotificationClass.PRE72H);
this.RegisterDatePickerChange(this.datePickerLastExpandedInspection, Message.NotificationClass.PRE72H);
- this.RegisterIntegerUpDownChange(this.integerUpDownPlannedPeriodOfStay, Message.NotificationClass.PRE72H);
+ this.RegisterIntegerUpDownChange(this.integerUpDownPlannedPeriodOfStay, Message.NotificationClass.PRE72H);
+ this.checkBoxTanker.Checked += CheckBoxTanker_Checked;
+ this.checkBoxTanker.Unchecked += CheckBoxTanker_Checked;
+ }
+
+ private void CheckBoxTanker_Checked(object sender, RoutedEventArgs e)
+ {
+ bool isTanker = this.checkBoxTanker.IsChecked ?? false;
+ this.doubleUpDownVolumeOfCargo.IsEnabled = isTanker;
+ this.comboBoxTankerHullConfig.IsEnabled = isTanker;
+ this.comboBoxConditionCargoBallastTanks.IsEnabled = isTanker;
+ this.textBoxNatureOfCargo.IsEnabled = isTanker;
}
public override void Initialize()
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml
index 8198fd60..a7583f1d 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/ShipDataDetailControl.xaml
@@ -49,21 +49,21 @@
-
+
+
+
-
-
+
-
@@ -90,11 +90,11 @@
+
+
-
-
diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj
index a7e259f6..265159b2 100644
--- a/ENI-2/ENI2/ENI2/ENI2.csproj
+++ b/ENI-2/ENI2/ENI2/ENI2.csproj
@@ -35,7 +35,7 @@
3.5.1.0
true
publish.html
- 1
+ 3
3.6.12.%2a
false
true
diff --git a/ENI-2/ENI2/ENI2/MainWindow.xaml.cs b/ENI-2/ENI2/ENI2/MainWindow.xaml.cs
index 82867287..524d3280 100644
--- a/ENI-2/ENI2/ENI2/MainWindow.xaml.cs
+++ b/ENI-2/ENI2/ENI2/MainWindow.xaml.cs
@@ -307,6 +307,7 @@ namespace ENI2
if (closedDialog.Core.PoC.Equals("ZZNOK"))
closedDialog.Core.IsTransit = true;
+ closedDialog.Core.Incoming = true;
closedDialog.Core.DefaultReportingPartyId = this.userEntity.Id;
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).Save(closedDialog.Core);
diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx
index f0da644b..3d4d135d 100644
Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ
diff --git a/nsw/HIS-NORD/Transmitter-Tool/client.log b/nsw/HIS-NORD/Transmitter-Tool/client.log
index a4d4beb6..2446525f 100644
--- a/nsw/HIS-NORD/Transmitter-Tool/client.log
+++ b/nsw/HIS-NORD/Transmitter-Tool/client.log
@@ -228,3 +228,19 @@
17.06.2017 10:14:59 Client started
-----------------------------
17.06.2017 10:15:00 wrong Version of XML file
+ -----------------------------
+13.08.2017 09:39:02 Client started
+ -----------------------------
+13.08.2017 09:39:03 wrong Version of XML file
+13.08.2017 09:39:04 wrong Version of XML file
+13.08.2017 09:39:04 wrong Version of XML file
+13.08.2017 09:39:04 wrong Version of XML file
+13.08.2017 09:39:05 wrong Version of XML file
+13.08.2017 09:39:05 wrong Version of XML file
+13.08.2017 09:39:05 wrong Version of XML file
+13.08.2017 09:39:05 wrong Version of XML file
+13.08.2017 09:39:06 wrong Version of XML file
+13.08.2017 09:39:06 wrong Version of XML file
+13.08.2017 09:39:07 wrong Version of XML file
+13.08.2017 09:39:07 wrong Version of XML file
+13.08.2017 09:39:07 wrong Version of XML file
diff --git a/nsw/Source/bsmd.dbh/Request.cs b/nsw/Source/bsmd.dbh/Request.cs
index aa293cee..9ce69f04 100644
--- a/nsw/Source/bsmd.dbh/Request.cs
+++ b/nsw/Source/bsmd.dbh/Request.cs
@@ -831,7 +831,7 @@ namespace bsmd.dbh
choiceTypes2.Add(ItemsChoiceType2.ValidSanitaryControlExemptionOrCertificateOnBoard);
mdhItems.Add(mdh.ValidSanitaryControlExemptionOrCertificateOnBoard ?? false ? RootSECValidISSCOnBoard.Y : RootSECValidISSCOnBoard.N);
- if (mdh.DateOfIssue.HasValue && !mdh.PlaceOfIssue.IsNullOrEmpty())
+ if (mdh.ValidSanitaryControlExemptionOrCertificateOnBoard ?? false)
{
choiceTypes2.Add(ItemsChoiceType2.ValidSanitaryControlExemptionOrCertificate);
RootMDHValidSanitaryControlExemptionOrCertificate cert = new RootMDHValidSanitaryControlExemptionOrCertificate();
diff --git a/nsw/Source/bsmd.hisnord/NSWResponse.cs b/nsw/Source/bsmd.hisnord/NSWResponse.cs
index bbb52da2..20571277 100644
--- a/nsw/Source/bsmd.hisnord/NSWResponse.cs
+++ b/nsw/Source/bsmd.hisnord/NSWResponse.cs
@@ -41,7 +41,27 @@ namespace bsmd.hisnord
XNamespace agntNS = "http://api.national-single-window.de/agnt";
XNamespace vioNS = "http://api.national-single-window.de/violation";
XNamespace errNS = "http://api.national-single-window.de/error";
-
+ XNamespace secNS = "http://api.national-single-window.de/sec";
+ XNamespace statNS = "http://api.national-single-window.de/stat";
+ XNamespace noa_nodNS = "http://api.national-single-window.de/noanod";
+ XNamespace ataNS = "http://api.national-single-window.de/ata";
+ XNamespace atdNS = "http://api.national-single-window.de/atd";
+ XNamespace pobaNS = "http://api.national-single-window.de/poba";
+ XNamespace pobdNS = "http://api.national-single-window.de/pobd";
+ XNamespace nameNS = "http://api.national-single-window.de/name";
+ XNamespace tiefaNS = "http://api.national-single-window.de/tiefa";
+ XNamespace tiefdNS = "http://api.national-single-window.de/tiefd";
+ XNamespace bkraNS = "http://api.national-single-window.de/bkra";
+ XNamespace bkrdNS = "http://api.national-single-window.de/bkrd";
+ XNamespace infoNS = "http://api.national-single-window.de/info";
+ XNamespace servNS = "http://api.national-single-window.de/serv";
+ XNamespace pre72hNS = "http://api.national-single-window.de/pre72h";
+ XNamespace wasNS = "http://api.national-single-window.de/was";
+ XNamespace crewNS = "http://api.national-single-window.de/crew";
+ XNamespace pasNS = "http://api.national-single-window.de/pas";
+ XNamespace bpolNS = "http://api.national-single-window.de/bpol";
+ XNamespace towaNS = "http://api.national-single-window.de/towa";
+ XNamespace towdNS = "http://api.national-single-window.de/towa";
XName idName = "ConveyanceCode";
var elem = xml.Descendants(idName);
@@ -91,6 +111,69 @@ namespace bsmd.hisnord
case Message.NotificationClass.AGNT:
lookupName = agntNS + "AGNTResponse";
break;
+ case Message.NotificationClass.SEC:
+ lookupName = secNS + "SECResponse";
+ break;
+ case Message.NotificationClass.STAT:
+ lookupName = statNS + "STATResponse";
+ break;
+ case Message.NotificationClass.NOA_NOD:
+ lookupName = noa_nodNS + "NOA_NODResponse";
+ break;
+ case Message.NotificationClass.ATA:
+ lookupName = ataNS + "ATAResponse";
+ break;
+ case Message.NotificationClass.ATD:
+ lookupName = atdNS + "ATDResponse";
+ break;
+ case Message.NotificationClass.POBA:
+ lookupName = pobaNS + "POBAResponse";
+ break;
+ case Message.NotificationClass.POBD:
+ lookupName = pobdNS + "POBDResponse";
+ break;
+ case Message.NotificationClass.NAME:
+ lookupName = nameNS + "NAMEResponse";
+ break;
+ case Message.NotificationClass.TIEFA:
+ lookupName = tiefaNS + "TIEFAResponse";
+ break;
+ case Message.NotificationClass.TIEFD:
+ lookupName = tiefdNS + "TIEFDResponse";
+ break;
+ case Message.NotificationClass.BKRA:
+ lookupName = bkraNS + "BKRAResponse";
+ break;
+ case Message.NotificationClass.BKRD:
+ lookupName = bkrdNS + "BKRDResponse";
+ break;
+ case Message.NotificationClass.INFO:
+ lookupName = infoNS + "INFOResponse";
+ break;
+ case Message.NotificationClass.SERV:
+ lookupName = servNS + "SERVResponse";
+ break;
+ case Message.NotificationClass.PRE72H:
+ lookupName = pre72hNS + "PRE72HResponse";
+ break;
+ case Message.NotificationClass.WAS:
+ lookupName = wasNS + "WASResponse";
+ break;
+ case Message.NotificationClass.CREW:
+ lookupName = crewNS + "CREWResponse";
+ break;
+ case Message.NotificationClass.PAS:
+ lookupName = pasNS + "PASResponse";
+ break;
+ case Message.NotificationClass.BPOL:
+ lookupName = bpolNS + "BPOLResponse";
+ break;
+ case Message.NotificationClass.TOWA:
+ lookupName = towaNS + "TOWAResponse";
+ break;
+ case Message.NotificationClass.TOWD:
+ lookupName = towdNS + "TOWDResponse";
+ break;
default:
lookupName = "dontmatchmeplease";
break;
diff --git a/nsw/Source/bsmd.hisnord/Request.cs b/nsw/Source/bsmd.hisnord/Request.cs
index 3737f152..20c7e01b 100644
--- a/nsw/Source/bsmd.hisnord/Request.cs
+++ b/nsw/Source/bsmd.hisnord/Request.cs
@@ -22,6 +22,7 @@ namespace bsmd.hisnord
private static ILog _log = LogManager.GetLogger(typeof(Request));
private static Dictionary _reportingPartyDict = null;
private static Dictionary coreFilenameDict = new Dictionary();
+ private static Dictionary noteMessageDict = new Dictionary();
internal static Dictionary ReportingPartyDict
{
@@ -73,11 +74,45 @@ namespace bsmd.hisnord
}
}
+ ///
+ /// Passende Nachricht (unter bestimmten Voraussetzungen) aus dem Sende-Dict holen (aber nur wenn sie wirklich
+ /// in die Nachricht serialisiert werden darf)
+ ///
+ private static Message GetSendMessage(Message.NotificationClass notificationClass)
+ {
+ Message result = null;
+
+ if (noteMessageDict.ContainsKey(notificationClass))
+ {
+ if (noteMessageDict[notificationClass].InternalStatus == Message.BSMDStatus.TOSEND)
+ {
+ if (!XtraSendLogic.ShouldSendMessage(noteMessageDict[notificationClass]))
+ {
+ _log.DebugFormat("skipping {0}", noteMessageDict[notificationClass].MessageNotificationClassDisplay);
+ noteMessageDict[notificationClass].InternalStatus = Message.BSMDStatus.SUSPENDED;
+ DBManager.Instance.Save(noteMessageDict[notificationClass]);
+ }
+ else
+ {
+ _log.DebugFormat("preparing {0}", noteMessageDict[notificationClass].MessageNotificationClassDisplay);
+ noteMessageDict[notificationClass].InternalStatus = Message.BSMDStatus.SENT;
+ result = noteMessageDict[notificationClass];
+ }
+ DBManager.Instance.Save(noteMessageDict[notificationClass]);
+ }
+ }
+ return result;
+ }
+
public static bool CreateSendFile(MessageCore core, List messages, bool useTest)
{
bool retval = true;
-
- messages.Sort();
+
+
+ // dieses Dict wird benötigt, da die Meldeklassen in der richtigen Reihenfolge hinzugefügt werden müssen
+ Request.noteMessageDict.Clear();
+ foreach (Message message in messages)
+ noteMessageDict[message.MessageNotificationClass] = message;
try
{
@@ -92,16 +127,16 @@ namespace bsmd.hisnord
_nsw.conveyance.owner_sender = new broker_owner();
ReportingParty rp = null;
- if(messages[0].MessageCore.DefaultReportingPartyId.HasValue && Request.ReportingPartyDict.ContainsKey(messages[0].MessageCore.DefaultReportingPartyId.Value))
- rp = Request.ReportingPartyDict[messages[0].MessageCore.DefaultReportingPartyId.Value];
+ if(core.DefaultReportingPartyId.HasValue && Request.ReportingPartyDict.ContainsKey(core.DefaultReportingPartyId.Value))
+ rp = Request.ReportingPartyDict[core.DefaultReportingPartyId.Value];
if(rp == null)
{
- _log.ErrorFormat("Cannot find reporting party for core {0}", messages[0].MessageCore.Id);
+ _log.ErrorFormat("Cannot find reporting party for core {0}", core.Id);
return false;
}
_nsw.conveyance.owner_sender.name_short = @"BSMD";
- _nsw.conveyance.owner_sender.name_long = @"BSMD";// rp.Name; // messages[0].MessageCore.Customer.Name;
+ _nsw.conveyance.owner_sender.name_long = @"BSMD";// rp.Name; // core.Customer.Name;
_nsw.conveyance.owner_sender.address = new addresstype();
@@ -117,35 +152,35 @@ namespace bsmd.hisnord
_nsw.conveyance.owner_sender.contact.phone = rp.Phone;
_nsw.conveyance.owner_sender.contact.fax = rp.Fax;
- _nsw.document_reference = messages[0].MessageCore.Id.Value.ToString();
+ _nsw.document_reference = core.Id.Value.ToString();
- if (!messages[0].MessageCore.VisitId.IsNullOrEmpty())
+ if (!core.VisitId.IsNullOrEmpty())
{
_nsw.conveyance.Items = new string[1];
_nsw.conveyance.ItemsElementName = new ItemsChoiceType[1];
- _nsw.conveyance.Items[0] = messages[0].MessageCore.VisitId;
+ _nsw.conveyance.Items[0] = core.VisitId;
_nsw.conveyance.ItemsElementName[0] = ItemsChoiceType.VisitId;
}
- else if (!messages[0].MessageCore.TransitId.IsNullOrEmpty())
+ else if (!core.TransitId.IsNullOrEmpty())
{
_nsw.conveyance.Items = new string[1];
_nsw.conveyance.ItemsElementName = new ItemsChoiceType[1];
- _nsw.conveyance.Items[0] = messages[0].MessageCore.TransitId;
+ _nsw.conveyance.Items[0] = core.TransitId;
_nsw.conveyance.ItemsElementName[0] = ItemsChoiceType.TransitId;
}
else // liegt noch nichts vor, Id muss beantragt werden
{
_nsw.conveyance.Items = new object[5];
_nsw.conveyance.ItemsElementName = new ItemsChoiceType[5];
- _nsw.conveyance.Items[0] = messages[0].MessageCore.Shipname;
+ _nsw.conveyance.Items[0] = core.Shipname;
_nsw.conveyance.ItemsElementName[0] = ItemsChoiceType.name;
- _nsw.conveyance.Items[1] = messages[0].MessageCore.Id.ToString();
+ _nsw.conveyance.Items[1] = core.Id.ToString();
_nsw.conveyance.ItemsElementName[1] = ItemsChoiceType.code;
- _nsw.conveyance.Items[2] = messages[0].MessageCore.IMO.IsNullOrEmpty() ? messages[0].MessageCore.ENI : messages[0].MessageCore.IMO;
- _nsw.conveyance.ItemsElementName[2] = messages[0].MessageCore.IMO.IsNullOrEmpty() ? ItemsChoiceType.ENINumber : ItemsChoiceType.IMONumber;
- _nsw.conveyance.Items[3] = messages[0].MessageCore.PoC;
+ _nsw.conveyance.Items[2] = core.IMO.IsNullOrEmpty() ? core.ENI : core.IMO;
+ _nsw.conveyance.ItemsElementName[2] = core.IMO.IsNullOrEmpty() ? ItemsChoiceType.ENINumber : ItemsChoiceType.IMONumber;
+ _nsw.conveyance.Items[3] = core.PoC;
_nsw.conveyance.ItemsElementName[3] = ItemsChoiceType.PortOfCall;
- _nsw.conveyance.Items[4] = messages[0].MessageCore.IsTransit ? messages[0].MessageCore.ETAKielCanal : messages[0].MessageCore.ETA; // TODO Datum konvertieren?
+ _nsw.conveyance.Items[4] = core.IsTransit ? core.ETAKielCanal : core.ETA; // TODO Datum konvertieren?
_nsw.conveyance.ItemsElementName[4] = ItemsChoiceType.ETAPortOfCall;
}
@@ -157,10 +192,9 @@ namespace bsmd.hisnord
// wir wissen noch nicht wieviele es werden, von daher erstmal eine Liste!
List items1ChoiceType = new List();
- List