diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index 7e7fdc1a..abdb9013 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -36,8 +36,8 @@
5.4.0.0
true
publish.html
- 3
- 7.6.0.%2a
+ 0
+ 7.7.0.%2a
false
true
true
diff --git a/bsmd.LockingService/bsmd.LockingService.csproj.user b/bsmd.LockingService/bsmd.LockingService.csproj.user
index afa33dd1..3517ad61 100644
--- a/bsmd.LockingService/bsmd.LockingService.csproj.user
+++ b/bsmd.LockingService/bsmd.LockingService.csproj.user
@@ -2,7 +2,7 @@
true
- Debug|Any CPU
+ Release|Any CPU
diff --git a/bsmd.database/Properties/AssemblyProductInfo.cs b/bsmd.database/Properties/AssemblyProductInfo.cs
index b432045f..500e1f5c 100644
--- a/bsmd.database/Properties/AssemblyProductInfo.cs
+++ b/bsmd.database/Properties/AssemblyProductInfo.cs
@@ -2,6 +2,6 @@
[assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")]
-[assembly: AssemblyInformationalVersion("7.6.0")]
+[assembly: AssemblyInformationalVersion("7.7.0")]
[assembly: AssemblyCopyright("Copyright © 2014-2022 schick Informatik")]
[assembly: AssemblyTrademark("")]
\ No newline at end of file
diff --git a/bsmd.database/Properties/AssemblyProjectInfo.cs b/bsmd.database/Properties/AssemblyProjectInfo.cs
index 61f6ea94..771af8fe 100644
--- a/bsmd.database/Properties/AssemblyProjectInfo.cs
+++ b/bsmd.database/Properties/AssemblyProjectInfo.cs
@@ -1,4 +1,4 @@
using System.Reflection;
-[assembly: AssemblyVersion("7.6.0.*")]
+[assembly: AssemblyVersion("7.7.0.*")]
diff --git a/bsmd.dbh/Properties/Settings.Designer.cs b/bsmd.dbh/Properties/Settings.Designer.cs
index b3e3c500..81661d5f 100644
--- a/bsmd.dbh/Properties/Settings.Designer.cs
+++ b/bsmd.dbh/Properties/Settings.Designer.cs
@@ -23,16 +23,6 @@ namespace bsmd.dbh.Properties {
}
}
- [global::System.Configuration.ApplicationScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
- [global::System.Configuration.DefaultSettingValueAttribute("https://edi-gate.dbh.de/test/bsmd-soap")]
- public string bsmd_dbh_DBHWebReference_Dbh_Osis_Answ_Ws {
- get {
- return ((string)(this["bsmd_dbh_DBHWebReference_Dbh_Osis_Answ_Ws"]));
- }
- }
-
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("00003050")]
diff --git a/bsmd.dbh/Properties/Settings.settings b/bsmd.dbh/Properties/Settings.settings
index f078fddb..a248a4c3 100644
--- a/bsmd.dbh/Properties/Settings.settings
+++ b/bsmd.dbh/Properties/Settings.settings
@@ -2,9 +2,6 @@
-
- https://edi-gate.dbh.de/test/bsmd-soap
-
00003050
diff --git a/bsmd.dbh/RequestUtil.cs b/bsmd.dbh/RequestUtil.cs
index b481c892..a7dfb25d 100644
--- a/bsmd.dbh/RequestUtil.cs
+++ b/bsmd.dbh/RequestUtil.cs
@@ -377,6 +377,1213 @@ namespace bsmd.dbh
break;
#endregion
+ #region BPOL
+ case Message.NotificationClass.BPOL:
+ {
+ if (message.Elements[0] is BPOL bpol)
+ {
+ RootBPOL rootBPOL = new RootBPOL();
+ RootBPOLPortOfItinerary[] poiArray = new RootBPOLPortOfItinerary[bpol.PortOfItineraries.Count];
+ rootBPOL.PortOfItinerary = poiArray;
+
+ for (int i = 0; i < bpol.PortOfItineraries.Count; i++)
+ {
+ RootBPOLPortOfItinerary port = new RootBPOLPortOfItinerary();
+ PortOfItinerary portOfItinerary = bpol.PortOfItineraries[i] as PortOfItinerary;
+ if (portOfItinerary.PortOfItineraryETA.HasValue)
+ port.PortOfItineraryETA = portOfItinerary.PortOfItineraryETA.Value;
+ port.PortOfItineraryName = portOfItinerary.PortOfItineraryName;
+ poiArray[i] = port;
+ }
+
+ if (bpol.StowawaysOnBoard.HasValue)
+ rootBPOL.StowawayOnBoard = bpol.StowawaysOnBoard.Value ?
+ RootSECValidISSCOnBoard.Y : RootSECValidISSCOnBoard.N;
+ else
+ rootBPOL.StowawayOnBoard = RootSECValidISSCOnBoard.N;
+
+ root.Items = new object[1];
+ root.Items[0] = rootBPOL;
+ }
+ break;
+ }
+
+ #endregion
+
+ #region CREW
+
+ case Message.NotificationClass.CREW:
+ {
+
+ RootCREW rootCREW = new RootCREW();
+
+ rootCREW.CrewMember = new RootCREWCrewMember[message.Elements.Count];
+ for (int i = 0; i < message.Elements.Count; i++)
+ {
+ CREW crew = message.Elements[i] as CREW;
+ rootCREW.CrewMember[i] = new RootCREWCrewMember();
+ if (crew.CrewMemberDateOfBirth.HasValue)
+ rootCREW.CrewMember[i].CrewMemberDateOfBirth = crew.CrewMemberDateOfBirth.Value;
+ rootCREW.CrewMember[i].CrewMemberDuty = crew.CrewMemberDuty;
+ rootCREW.CrewMember[i].CrewMemberFirstName = crew.CrewMemberFirstName;
+ rootCREW.CrewMember[i].CrewMemberGenderSpecified = crew.CrewMemberGender.HasValue;
+ if (crew.CrewMemberGender.HasValue)
+ rootCREW.CrewMember[i].CrewMemberGender = (Gender)crew.CrewMemberGender.Value;
+ rootCREW.CrewMember[i].CrewMemberIdentityDocumentId = crew.CrewMemberIdentityDocumentId;
+ if (crew.CrewMemberIdentityDocumentType.HasValue)
+ rootCREW.CrewMember[i].CrewMemberIdentityDocumentType = (IdDocType)crew.CrewMemberIdentityDocumentType.Value;
+ rootCREW.CrewMember[i].CrewMemberLastName = crew.CrewMemberLastName;
+ rootCREW.CrewMember[i].CrewMemberNationality = crew.CrewMemberNationality;
+ rootCREW.CrewMember[i].CrewMemberPlaceOfBirth = crew.CrewMemberPlaceOfBirth;
+ rootCREW.CrewMember[i].CrewMemberVisaNumber = crew.CrewMemberVisaNumber;
+ if (crew.CrewMemberIdentityDocumentIssuingState.Trim().Length == 2)
+ rootCREW.CrewMember[i].CrewMemberIdentityDocumentIssuingState = crew.CrewMemberIdentityDocumentIssuingState;
+ if (crew.CrewMemberIdentityDocumentExpiryDate.HasValue)
+ rootCREW.CrewMember[i].CrewMemberIdentityDocumentExpiryDate = crew.CrewMemberIdentityDocumentExpiryDate.Value;
+ }
+
+ root.Items = new object[1];
+ root.Items[0] = rootCREW;
+
+ }
+ break;
+
+ #endregion
+
+ #region PAS
+ case Message.NotificationClass.PAS:
+ {
+ RootPAS rootPAS = new RootPAS();
+ rootPAS.Passenger = new RootPASPassenger[message.Elements.Count];
+ for (int i = 0; i < message.Elements.Count; i++)
+ {
+ PAS pas = message.Elements[i] as PAS;
+ rootPAS.Passenger[i] = new RootPASPassenger();
+ rootPAS.Passenger[i].PassengerLastName = pas.PassengerLastName;
+ rootPAS.Passenger[i].PassengerFirstName = pas.PassengerFirstName;
+ rootPAS.Passenger[i].PassengerPlaceOfBirth = pas.PassengerPlaceOfBirth;
+ if (pas.PassengerDateOfBirth.HasValue)
+ rootPAS.Passenger[i].PassengerDateOfBirth = pas.PassengerDateOfBirth.Value;
+ rootPAS.Passenger[i].PassengerGenderSpecified = pas.PassengerGender.HasValue;
+ if (pas.PassengerGender.HasValue)
+ rootPAS.Passenger[i].PassengerGender = (Gender)pas.PassengerGender.Value;
+ rootPAS.Passenger[i].PassengerNationality = pas.PassengerNationality;
+ if (pas.PassengerIdentityDocumentType.HasValue)
+ rootPAS.Passenger[i].PassengerIdentityDocumentType = (IdDocType)pas.PassengerIdentityDocumentType.Value;
+ rootPAS.Passenger[i].PassengerIdentityDocumentId = pas.PassengerIdentityDocumentId;
+ rootPAS.Passenger[i].PassengerVisaNumber = pas.PassengerVisaNumber;
+ rootPAS.Passenger[i].PassengerPortOfEmbarkation = pas.PassengerPortOfEmbarkation;
+ rootPAS.Passenger[i].PassengerPortOfDisembarkation = pas.PassengerPortOfDisembarkation;
+ rootPAS.Passenger[i].PassengerInTransit = pas.PassengerInTransit ?? false ? RootSECValidISSCOnBoard.Y : RootSECValidISSCOnBoard.N;
+ if (pas.PassengerIdentityDocumentIssuingState.Trim().Length == 2)
+ rootPAS.Passenger[i].PassengerIdentityDocumentIssuingState = pas.PassengerIdentityDocumentIssuingState;
+ if (pas.PassengerIdentityDocumentExpiryDate.HasValue)
+ rootPAS.Passenger[i].PassengerIdentityDocumentExpiryDate = pas.PassengerIdentityDocumentExpiryDate.Value;
+ }
+
+ root.Items = new object[1];
+ root.Items[0] = rootPAS;
+ }
+ break;
+ #endregion
+
+ #region BKRA
+ case Message.NotificationClass.BKRA:
+ {
+ RootBKRA rootBKRA = new RootBKRA();
+
+ rootBKRA.BunkerFuelArrival = new RootBKRABunkerFuelArrival[message.Elements.Count];
+ for (int i = 0; i < message.Elements.Count; i++)
+ {
+ BRKA bkra = message.Elements[i] as BRKA;
+ rootBKRA.BunkerFuelArrival[i] = new RootBKRABunkerFuelArrival();
+ rootBKRA.BunkerFuelArrival[i].BunkerFuelQuantity_TNE = Decimal.Round((decimal)(bkra.BunkerFuelQuantity_TNE ?? 0), 3);
+ rootBKRA.BunkerFuelArrival[i].BunkerFuelType = bkra.BunkerFuelType;
+ }
+
+ root.Items = new object[1];
+ root.Items[0] = rootBKRA;
+ }
+ break;
+ #endregion
+
+ #region BKRD
+ case Message.NotificationClass.BKRD:
+ {
+ RootBKRD rootBKRD = new RootBKRD();
+
+ rootBKRD.BunkerFuelDeparture = new RootBKRDBunkerFuelDeparture[message.Elements.Count];
+ for (int i = 0; i < message.Elements.Count; i++)
+ {
+ BRKD bkrd = message.Elements[i] as BRKD;
+ rootBKRD.BunkerFuelDeparture[i] = new RootBKRDBunkerFuelDeparture();
+ rootBKRD.BunkerFuelDeparture[i].BunkerFuelQuantity_TNE = Decimal.Round((decimal)(bkrd.BunkerFuelQuantity_TNE ?? 0), 3);
+ rootBKRD.BunkerFuelDeparture[i].BunkerFuelType = bkrd.BunkerFuelType;
+ }
+
+ root.Items = new object[1];
+ root.Items[0] = rootBKRD;
+ }
+ break;
+ #endregion
+
+ #region TIEFA
+ case Message.NotificationClass.TIEFA:
+ {
+ RootTIEFA rootTIEFA = new RootTIEFA();
+ TIEFA tiefa = message.Elements[0] as TIEFA;
+ rootTIEFA.DraughtUponArrival_DMT = Decimal.Round((decimal)(tiefa.DraughtUponArrival_DMT ?? 0), 1);
+ root.Items = new object[1];
+ root.Items[0] = rootTIEFA;
+ }
+ break;
+ #endregion
+
+ #region TIEFD
+ case Message.NotificationClass.TIEFD:
+ {
+ RootTIEFD rootTIEFD = new RootTIEFD();
+ TIEFD tiefd = message.Elements[0] as TIEFD;
+ rootTIEFD.DraughtUponDeparture_DMT = Decimal.Round((decimal)(tiefd.DraughtUponDeparture_DMT ?? 0));
+ root.Items = new object[1];
+ root.Items[0] = rootTIEFD;
+ }
+ break;
+ #endregion
+
+ #region NAME
+ case Message.NotificationClass.NAME:
+ {
+ RootNAME rootName = new RootNAME();
+ NAME name = message.Elements[0] as NAME;
+ rootName.NameOfMaster = name.NameOfMaster;
+ root.Items = new object[1];
+ root.Items[0] = rootName;
+ }
+ break;
+ #endregion
+
+ #region POBA
+ case Message.NotificationClass.POBA:
+ {
+ RootPOBA rootPoba = new RootPOBA();
+ POBA poba = message.Elements[0] as POBA;
+ rootPoba.TotalCrewMembersOnBoardUponArrival = poba.TotalCrewMembersOnBoardUponArrival ?? 0;
+ rootPoba.TotalPassengersOnBoardUponArrival = poba.TotalPassengersOnBoardUponArrival ?? 0;
+ rootPoba.TotalPersonsOnBoardUponArrival = poba.TotalPersonsOnBoardUponArrival ?? 0;
+ rootPoba.TotalStowawaysOnBoardUponArrival = poba.TotalStowawaysOnBoardUponArrival ?? 0;
+ root.Items = new object[1];
+ root.Items[0] = rootPoba;
+ }
+ break;
+ #endregion
+
+ #region POBD
+ case Message.NotificationClass.POBD:
+ {
+ RootPOBD rootPobd = new RootPOBD();
+ POBD pobd = message.Elements[0] as POBD;
+ rootPobd.TotalCrewMembersOnBoardUponDeparture = pobd.TotalCrewMembersOnBoardUponDeparture ?? 0;
+ rootPobd.TotalPassengersOnBoardUponDeparture = pobd.TotalPassengersOnBoardUponDeparture ?? 0;
+ rootPobd.TotalPersonsOnBoardUponDeparture = pobd.TotalPersonsOnBoardUponDeparture ?? 0;
+ rootPobd.TotalStowawaysOnBoardUponDeparture = pobd.TotalStowawaysOnBoardUponDeparture ?? 0;
+ root.Items = new object[1];
+ root.Items[0] = rootPobd;
+ }
+ break;
+ #endregion
+
+ #region LADG
+ case Message.NotificationClass.LADG:
+ {
+ RootLADG rootLADG = new RootLADG();
+ List cargoList = new List();
+ for (int i = 0; i < message.Elements.Count; i++)
+ {
+ LADG ladg = message.Elements[i] as LADG;
+ RootLADGCargo cargo = new RootLADGCargo();
+ if (ladg.CargoHandlingType.HasValue)
+ {
+ if (ladg.CargoHandlingType > 1) continue;
+ cargo.CargoHandlingType = (ladg.CargoHandlingType == 0) ? HandlingType.LOAD : HandlingType.DISCHARGE;
+ }
+
+
+ cargo.CargoCodeNST = ladg.CargoCodeNST;
+ if (!ladg.CargoCodeNST.IsNullOrEmpty())
+ {
+ if (cargo.CargoCodeNST.Length > 2)
+ {
+ cargo.CargoCodeNST = ladg.CargoCodeNST.Substring(0, 2);
+ }
+ }
+
+ if (!ladg.CargoCodeNST_3.IsNullOrEmpty())
+ cargo.CargoCodeNST_3 = ladg.CargoCodeNST_3.Substring(0, 1);
+
+ if (ladg.CargoLACode.HasValue)
+ cargo.CargoLACode = ladg.CargoLACode.Value;
+ cargo.CargoLACodeSpecified = ladg.CargoLACode.HasValue;
+
+ if (ladg.CargoGrossQuantity_TNE.HasValue)
+ cargo.CargoGrossQuantity_TNE = Decimal.Round((decimal)ladg.CargoGrossQuantity_TNE.Value, 3);
+
+ cargo.CargoNumberOfItemsSpecified = ladg.CargoNumberOfItems.HasValue;
+ if (ladg.CargoNumberOfItems.HasValue)
+ cargo.CargoNumberOfItems = ladg.CargoNumberOfItems.Value;
+
+ if (ladg.PortOfLoading.IsNullOrEmpty())
+ cargo.CargoPortOfLoading = "ZZUKN";
+ else
+ cargo.CargoPortOfLoading = ladg.PortOfLoading;
+
+ if (ladg.PortOfDischarge.IsNullOrEmpty())
+ cargo.CargoPortOfDischarge = "ZZUKN";
+ else
+ cargo.CargoPortOfDischarge = ladg.PortOfDischarge;
+
+ cargoList.Add(cargo);
+ }
+ rootLADG.Cargo = cargoList.ToArray();
+
+ root.Items = new object[1];
+ root.Items[0] = rootLADG;
+ }
+ break;
+ #endregion
+
+ #region INFO
+ case Message.NotificationClass.INFO:
+ {
+ RootINFO rootInfo = new RootINFO();
+ INFO info = message.Elements[0] as INFO;
+ if (info.ShippingArea.HasValue)
+ rootInfo.ShippingArea = (ShippingArea)info.ShippingArea.Value;
+ rootInfo.PortArea = info.PortArea;
+ rootInfo.RequestedPositionInPortOfCall = info.RequestedPositionInPortOfCall;
+ if (!info.SpecialRequirementsOfShipAtBerth.IsNullOrEmpty())
+ rootInfo.SpecialRequirementsOfShipAtBerth = info.SpecialRequirementsOfShipAtBerth;
+
+ if (info.SpecialRequirementsOfShipAtBerth.IsNullOrEmpty())
+ {
+ _log.Info("dbh INFO send: SpecialRequirementsOfShipAtBerth is empty.");
+ // Name des Agenten eintragen
+ }
+ rootInfo.ConstructionCharacteristicsOfShip = info.ConstructionCharacteristicsOfShip;
+ rootInfo.BowThrusterPower = info.BowThrusterPower;
+ rootInfo.SternThrusterPower = info.SternThrusterPower;
+ if (info.FumigatedBulkCargo.HasValue)
+ rootInfo.FumigatedBulkCargo = (info.FumigatedBulkCargo.Value == 0) ? RootINFOFumigatedBulkCargo.N : RootINFOFumigatedBulkCargo.Y;
+ else
+ rootInfo.FumigatedBulkCargo = RootINFOFumigatedBulkCargo.N;
+ rootInfo.DeadWeightSummer_TNESpecified = info.DeplacementSummerDraught_TNE.HasValue;
+ if (info.DeplacementSummerDraught_TNE.HasValue)
+ rootInfo.DeadWeightSummer_TNE = Decimal.Round((decimal)info.DeplacementSummerDraught_TNE.Value, 3);
+
+ root.Items = new object[1];
+ root.Items[0] = rootInfo;
+ }
+ break;
+ #endregion
+
+ #region SERV
+ case Message.NotificationClass.SERV:
+ {
+ RootSERV rootServ = new RootSERV();
+ rootServ.Service = new RootSERVService[message.Elements.Count];
+ for (int i = 0; i < message.Elements.Count; i++)
+ {
+ rootServ.Service[i] = new RootSERVService();
+ SERV serv = message.Elements[i] as SERV;
+ rootServ.Service[i].ServiceName = serv.ServiceName;
+ rootServ.Service[i].ServiceBeneficiary = serv.ServiceBeneficiary;
+ rootServ.Service[i].ServiceInvoiceRecipient = serv.ServiceInvoiceRecipient;
+ }
+
+ root.Items = new object[1];
+ root.Items[0] = rootServ;
+ }
+ break;
+ #endregion
+
+ #region PRE72H
+ case Message.NotificationClass.PRE72H:
+ {
+ RootPRE72H rootPre = new RootPRE72H();
+ PRE72H pre72h = message.Elements[0] as PRE72H;
+ rootPre.Tanker = pre72h.Tanker ?? false ? RootSECValidISSCOnBoard.Y : RootSECValidISSCOnBoard.N;
+ if (pre72h.Tanker ?? false)
+ {
+
+ rootPre.TankerDetails = new RootPRE72HTankerDetails();
+ if (pre72h.TankerHullConfiguration.HasValue)
+ rootPre.TankerDetails.TankerHullConfiguration = (HullConfiguration)pre72h.TankerHullConfiguration.Value;
+ if (pre72h.ConditionCargoBallastTanks.HasValue)
+ rootPre.TankerDetails.ConditionCargoBallastTanks = (TankCondition)pre72h.ConditionCargoBallastTanks.Value;
+ if (pre72h.NatureOfCargo != string.Empty)
+ rootPre.TankerDetails.TypeOfCargo = pre72h.NatureOfCargo;
+ bool sendVolume = pre72h.VolumeOfCargo.HasValue && (pre72h.VolumeOfCargo.Value > 0);
+ rootPre.TankerDetails.VolumeOfCargo_TNESpecified = sendVolume;
+ if (sendVolume)
+ rootPre.TankerDetails.VolumeOfCargo_TNE = Decimal.Round((decimal)(pre72h.VolumeOfCargo.Value), 3);
+
+ }
+ rootPre.PlannedOperations = pre72h.PlannedOperations;
+ rootPre.PlannedWorks = pre72h.PlannedWorks;
+ rootPre.DateOfLastExpandedInspectionSpecified = pre72h.DateOfLastExpandedInspection.HasValue;
+ if (pre72h.DateOfLastExpandedInspection.HasValue)
+ rootPre.DateOfLastExpandedInspection = pre72h.DateOfLastExpandedInspection.Value;
+ if (pre72h.PlannedPeriodOfStay_HUR.HasValue)
+ rootPre.PlannedPeriodOfStay_HUR = Decimal.Round((decimal)(pre72h.PlannedPeriodOfStay_HUR.Value), 2);
+
+ root.Items = new object[1];
+ root.Items[0] = rootPre;
+ }
+ break;
+ #endregion
+
+ #region MDH
+ case Message.NotificationClass.MDH:
+ {
+ RootMDH rootMDH = new RootMDH();
+ MDH mdh = message.Elements[0] as MDH;
+ if (!mdh.MDHSimplification.HasValue)
+ {
+ _log.ErrorFormat("MDH {0} doesnt have MDHSimplification field set, aborting message", mdh.Id);
+ return null; // das wird wahrscheinlich nie passieren
+ }
+ if (mdh.MDHSimplification.Value)
+ {
+ rootMDH.Items = new object[2];
+ rootMDH.ItemsElementName = new ItemsChoiceType2[2];
+ rootMDH.ItemsElementName[0] = ItemsChoiceType2.MDHSimplification;
+ rootMDH.Items[0] = "Y";
+ rootMDH.ItemsElementName[1] = ItemsChoiceType2.PortOfCallWhereCompleteMDHNotified;
+ rootMDH.Items[1] = mdh.PortOfCallWhereCompleteMDHNotified;
+ }
+ else
+ {
+ List