diff --git a/ENI-2/ENI2/ENI2/App.config b/ENI-2/ENI2/ENI2/App.config
index 2233c98e..807056b9 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.4/LockingService/LockingService.svc
+
-
- Data Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False
+ Data Source=192.168.2.12;Initial Catalog=nsw;Uid=dfuser;Pwd=dfpasswd;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs
index d766c2d8..903ff25c 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/SecurityDetailControl.xaml.cs
@@ -354,8 +354,8 @@ namespace ENI2.DetailViewControls
if (!reader.IsDBNull(7)) l10c.PortFacilityGISISCode = gisis.ToString().PadLeft(4, '0');
if (!reader.IsDBNull(8)) l10c.PortFacilitySecurityMattersToReport = reader.GetString(8);
if (l10c.PortFacilitySecurityMattersToReport.Equals("nil", StringComparison.CurrentCultureIgnoreCase))
- l10c.PortFacilitySecurityMattersToReport = null;
-
+ l10c.PortFacilitySecurityMattersToReport = null;
+ if (!reader.IsDBNull(9)) l10c.PortFacilityGISISCodeLocode = reader.GetString(9);
l10c.SEC = this._sec;
l10c.IsDirty = true;
l10c.Identifier = LastTenPortFacilitiesCalled.GetNewIdentifier(this._sec.LastTenPortFacilitesCalled);
diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj
index 1f679040..c3afdae6 100644
--- a/ENI-2/ENI2/ENI2/ENI2.csproj
+++ b/ENI-2/ENI2/ENI2/ENI2.csproj
@@ -36,7 +36,7 @@
true
publish.html
1
- 5.0.3.%2a
+ 5.0.4.%2a
false
true
true
diff --git a/ENI-2/ENI2/ENI2/EditControls/CopyDeclarationDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/CopyDeclarationDialog.xaml.cs
index d142f538..90af9537 100644
--- a/ENI-2/ENI2/ENI2/EditControls/CopyDeclarationDialog.xaml.cs
+++ b/ENI-2/ENI2/ENI2/EditControls/CopyDeclarationDialog.xaml.cs
@@ -127,12 +127,13 @@ namespace ENI2.EditControls
{
this.NewCore.IsTransit = true;
this.NewCore.ETAKielCanal = this.datePickerETA.SelectedDate;
-
+ this.NewCore.TransitId = this.textBoxVisitTransitId.Text.Trim();
}
else
{
this.NewCore.IsTransit = false;
this.NewCore.ETA = this.datePickerETA.SelectedDate;
+ this.NewCore.VisitId = this.textBoxVisitTransitId.Text.Trim();
}
if (this.doubleUpDownIMO.Value.HasValue)
diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx
index 9e98eff7..7f01adb3 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 3bbf6526..eb99b6b1 100644
--- a/nsw/Source/bsmd.ExcelReadService/Util.cs
+++ b/nsw/Source/bsmd.ExcelReadService/Util.cs
@@ -1363,7 +1363,8 @@ namespace bsmd.ExcelReadService
// RM am 24.1.18, ich hoffe das stimmt so wie sie meint..
if((reader.Mode == ExcelReader.CountryMode.DK) && (i==9))
{
- waste.WasteType = 2300;
+ _log.DebugFormat("DK: Changing Waste code {0} to 2300 for line {1}", waste.WasteType, i);
+ waste.WasteType = 2300;
}
reader.Conf.ConfirmText(wasteDescription, waste.WasteDescription, waste.WasteDescription.IsNullOrEmpty() ? ExcelReader.ReadState.WARN : ExcelReader.ReadState.OK);
diff --git a/nsw/Source/bsmd.dbh.ResponseService/IResponseService.cs b/nsw/Source/bsmd.dbh.ResponseService/IResponseService.cs
index ebdd3897..8ef2c266 100644
--- a/nsw/Source/bsmd.dbh.ResponseService/IResponseService.cs
+++ b/nsw/Source/bsmd.dbh.ResponseService/IResponseService.cs
@@ -21,7 +21,7 @@ namespace bsmd.dbh.ResponseService
bsmd.dbh.response.RootReportingClassesPartial ReportingClassesPartial,
bsmd.dbh.response.RootReportingClassesError RootReportingClassesError,
bsmd.dbh.response.RootReportingClassesResetted ReportingClassesResetted,
- List Messages);
+ bsmd.dbh.response.Message[] Messages);
}
diff --git a/nsw/Source/bsmd.dbh.ResponseService/ResponseService.svc.cs b/nsw/Source/bsmd.dbh.ResponseService/ResponseService.svc.cs
index 1efa8638..5c3354b0 100644
--- a/nsw/Source/bsmd.dbh.ResponseService/ResponseService.svc.cs
+++ b/nsw/Source/bsmd.dbh.ResponseService/ResponseService.svc.cs
@@ -18,7 +18,7 @@ namespace bsmd.dbh.ResponseService
bsmd.dbh.response.RootReportingClassesPartial ReportingClassesPartial,
bsmd.dbh.response.RootReportingClassesError RootReportingClassesError,
bsmd.dbh.response.RootReportingClassesResetted ReportingClassesResetted,
- List Messages)
+ bsmd.dbh.response.Message[] Messages)
{
// Der Fehler hier aktuell ist dass alles funktioniert, außer dass "Messages" nicht
@@ -36,7 +36,7 @@ namespace bsmd.dbh.ResponseService
else
{
_log.InfoFormat(Messages.GetType().ToString());
- _log.InfoFormat("{0} RootMessage elements received", (Messages.Count));
+ _log.InfoFormat("{0} Message elements received", Messages.Length);
}
diff --git a/nsw/Source/bsmd.dbh/NSWResponse.cs b/nsw/Source/bsmd.dbh/NSWResponse.cs
index 473575b6..57a3f1e1 100644
--- a/nsw/Source/bsmd.dbh/NSWResponse.cs
+++ b/nsw/Source/bsmd.dbh/NSWResponse.cs
@@ -46,7 +46,7 @@ namespace bsmd.dbh.response
private RootReportingClassesResetted reportingClassesResettedField;
- private RootMessage[] messagesField;
+ private Message[] messagesField;
///
public string Version
@@ -180,7 +180,7 @@ namespace bsmd.dbh.response
///
[System.Xml.Serialization.XmlArrayItemAttribute("Message", IsNullable = false)]
- public RootMessage[] Messages
+ public Message[] Messages
{
get
{
@@ -658,7 +658,7 @@ namespace bsmd.dbh.response
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
- public partial class RootMessage
+ public partial class Message
{
private string idField;
diff --git a/nsw/Source/bsmd.dbh/Request.cs b/nsw/Source/bsmd.dbh/Request.cs
index dacf173f..420eabbe 100644
--- a/nsw/Source/bsmd.dbh/Request.cs
+++ b/nsw/Source/bsmd.dbh/Request.cs
@@ -773,7 +773,9 @@ namespace bsmd.dbh
rootInfo.ShippingArea = (ShippingArea)info.ShippingArea.Value;
rootInfo.PortArea = info.PortArea;
rootInfo.RequestedPositionInPortOfCall = info.RequestedPositionInPortOfCall;
- rootInfo.SpecialRequirementsOfShipAtBerth = info.SpecialRequirementsOfShipAtBerth;
+ if(!info.SpecialRequirementsOfShipAtBerth.IsNullOrEmpty())
+ rootInfo.SpecialRequirementsOfShipAtBerth = info.SpecialRequirementsOfShipAtBerth;
+
if(info.SpecialRequirementsOfShipAtBerth.IsNullOrEmpty())
{
_log.Info("dbh INFO send: SpecialRequirementsOfShipAtBerth is empty.");
diff --git a/nsw/Source/bsmd.dbh/Response.cs b/nsw/Source/bsmd.dbh/Response.cs
index 4651da80..299cd481 100644
--- a/nsw/Source/bsmd.dbh/Response.cs
+++ b/nsw/Source/bsmd.dbh/Response.cs
@@ -22,7 +22,7 @@ namespace bsmd.dbh
private static ILog _log = LogManager.GetLogger("dbh Response");
public static void ProcessResponse(string VisitId, string TransitId, DateTime Timestamp,
- string SenderReference, response.RootType Type, List Messages,
+ string SenderReference, response.RootType Type, bsmd.dbh.response.Message[] Messages,
bsmd.dbh.response.RootReportingClassesFull ReportingClassesFull,
bsmd.dbh.response.RootReportingClassesPartial ReportingClassesPartial,
bsmd.dbh.response.RootReportingClassesError RootReportingClassesError,
@@ -130,7 +130,7 @@ namespace bsmd.dbh
// Status zu den jeweiligen Nachrichten. Bei uns sollte die Anzahl hier immer 1 sein, da wir die Dinger
// einzeln verschicken.
- for (int i = 0; i < Messages.Count; i++)
+ for (int i = 0; i < Messages.Length; i++)
{
_log.InfoFormat("message {0} type {1}: {2}", i,
Messages[i].Type,
@@ -144,6 +144,7 @@ namespace bsmd.dbh
_log.WarnFormat("Error received for {0}: {1}", Messages[i].Type, error.ErrorText);
error.MessageHeaderId = aMessage.Id.Value;
aMessage.InternalStatus = Message.BSMDStatus.ERROR;
+ aMessage.StatusInfo = string.Format("Id:{0} Loc:{1} - {2}", Messages[i].ID, Messages[i].Location, Messages[i].Text);
DBManager.Instance.Save(error);
aMessage.SendSuccess = false;
break;
@@ -154,6 +155,7 @@ namespace bsmd.dbh
_log.WarnFormat("Violation received for {0}: {1}", Messages[i].Type, violation.ViolationText);
violation.MessageHeaderId = aMessage.Id.Value;
aMessage.InternalStatus = Message.BSMDStatus.VIOLATION;
+ aMessage.StatusInfo = string.Format("Id:{0} Loc:{1} - {2}", Messages[i].ID, Messages[i].Location, Messages[i].Text);
aMessage.SendSuccess = true;
DBManager.Instance.Save(violation);
@@ -161,12 +163,14 @@ namespace bsmd.dbh
case dbh.response.RootMessageType.WARNING:
_log.InfoFormat("WARNING received for {0}: {1}", Messages[i].Type, Messages[i].Text);
+ aMessage.StatusInfo = string.Format("Id:{0} Loc:{1} - {2}", Messages[i].ID, Messages[i].Location, Messages[i].Text);
aMessage.SendSuccess = true;
break;
case dbh.response.RootMessageType.INFO:
default:
_log.InfoFormat("INFO received for {0}: {1}", Messages[i].Type, Messages[i].Text);
+ aMessage.StatusInfo = string.Format("Id:{0} Loc:{1} - {2}", Messages[i].ID, Messages[i].Location, Messages[i].Text);
aMessage.SendSuccess = true;
break;
}
diff --git a/nsw/Source/bsmd.hisnord/Request.cs b/nsw/Source/bsmd.hisnord/Request.cs
index 284894ba..d1eab914 100644
--- a/nsw/Source/bsmd.hisnord/Request.cs
+++ b/nsw/Source/bsmd.hisnord/Request.cs
@@ -478,7 +478,8 @@ namespace bsmd.hisnord
hn_info.ShippingArea = (shippingareatype)info.ShippingArea.Value;
hn_info.PortArea = info.PortArea;
hn_info.RequestedPositionInPortOfCall = info.RequestedPositionInPortOfCall;
- hn_info.SpecialRequirementsOfShipAtBerth = info.SpecialRequirementsOfShipAtBerth;
+ if(!info.SpecialRequirementsOfShipAtBerth.IsNullOrEmpty())
+ hn_info.SpecialRequirementsOfShipAtBerth = info.SpecialRequirementsOfShipAtBerth;
hn_info.ConstructionCharacteristicsOfShip = info.ConstructionCharacteristicsOfShip;
hn_info.BowThrusterPower = info.BowThrusterPower;
hn_info.SternThrusterPower = info.SternThrusterPower;
diff --git a/nsw/Source/bsmd.hisnord/Response.cs b/nsw/Source/bsmd.hisnord/Response.cs
index cbe56f4f..1319a726 100644
--- a/nsw/Source/bsmd.hisnord/Response.cs
+++ b/nsw/Source/bsmd.hisnord/Response.cs
@@ -148,6 +148,7 @@ namespace bsmd.hisnord
if ((nswResponse.Status == "REJECTED") && ((core.Cancelled ?? false) == true))
{
core.Cancelled = false; // CANCEL fehlgeschlagen
+ core.BSMDStatusInternal = MessageCore.BSMDStatus.FAILURE;
_log.InfoFormat("Cancel rejected for {0}", core.DisplayId);
}
@@ -237,7 +238,7 @@ namespace bsmd.hisnord
}
- if(!aMessageStillInSENTstate)
+ if(!aMessageStillInSENTstate && !(core.Cancelled ?? false))
core.BSMDStatusInternal = MessageCore.BSMDStatus.RESPONDED;
DBManager.Instance.Save(core);