diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx index b93f4b40..bfab2cfb 100644 Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ diff --git a/nsw/Source/SQL/tabledump.sql b/nsw/Source/SQL/tabledump.sql new file mode 100644 index 00000000..6e02f542 Binary files /dev/null and b/nsw/Source/SQL/tabledump.sql differ diff --git a/nsw/Source/bsmd.dakosy/Request.cs b/nsw/Source/bsmd.dakosy/Request.cs index c79328cc..94c6d00f 100644 --- a/nsw/Source/bsmd.dakosy/Request.cs +++ b/nsw/Source/bsmd.dakosy/Request.cs @@ -260,7 +260,7 @@ namespace bsmd.dakosy vList.Visit[0].LADG[i].CargoCode.Value = ladg.CargoCodeNST; vList.Visit[0].LADG[i].CargoHandlingTypeSpecified = ladg.CargoHandlingType.HasValue; byte ht = ladg.CargoHandlingType ?? 0; - vList.Visit[0].LADG[i].CargoHandlingType = (CargoHandlingType)ht; + vList.Visit[0].LADG[i].CargoHandlingType = CHTFromNSWEnumeration(ht); vList.Visit[0].LADG[i].CargoGrossQuantityTNESpecified = ladg.CargoGrossQuantity_TNE.HasValue; vList.Visit[0].LADG[i].CargoGrossQuantityTNE = (double) (ladg.CargoGrossQuantity_TNE ?? 0); vList.Visit[0].LADG[i].CargoNumberOfItemsSpecified = ladg.CargoNumberOfItems.HasValue; @@ -313,8 +313,8 @@ namespace bsmd.dakosy case Message.NotificationClass.INFO: bsmd.database.INFO info = aMessage.Elements[0] as bsmd.database.INFO; vList.Visit[0].INFO = new INFO(); - if(info.ShippingArea.HasValue) - vList.Visit[0].INFO.ShippingArea = (ShippingAreaType)info.ShippingArea.Value; + if (info.ShippingArea.HasValue) + vList.Visit[0].INFO.ShippingArea = SATFromNSWEnumeration(info.ShippingArea.Value); vList.Visit[0].INFO.RequestedPositionInPortOfCall = info.RequestedPositionInPortOfCall; vList.Visit[0].INFO.SpecialRequirementsOfShipAtBerth = info.SpecialRequirementsOfShipAtBerth; vList.Visit[0].INFO.ConstructionCharacteristicsOfShip = info.ConstructionCharacteristicsOfShip; @@ -731,7 +731,7 @@ namespace bsmd.dakosy } vList.Visit[0].WAS.WasteDisposalDeliverySpecified = was.WasteDisposalDelivery.HasValue; byte wdd = was.WasteDisposalDelivery ?? 0; - vList.Visit[0].WAS.WasteDisposalDelivery = (WasteDisposalDeliveryType) wdd; + vList.Visit[0].WAS.WasteDisposalDelivery = WDDTypeFromNSWEnumeration(wdd); if (was.Waste.Count > 0) { vList.Visit[0].WAS.Waste = new Waste[was.Waste.Count]; @@ -952,6 +952,10 @@ namespace bsmd.dakosy #endregion + #region static enumeration correction funcs + + // all das nur weil die Blödmänner andere Enums angelegt haben!!! + static IdentityDocumentType CrewDocumentFromNSWEnumeration(byte nswValue) { switch(nswValue) @@ -981,5 +985,36 @@ namespace bsmd.dakosy } } + static WasteDisposalDeliveryType WDDTypeFromNSWEnumeration(byte nswValue) + { + switch(nswValue) + { + case 0: return WasteDisposalDeliveryType.ALL; + case 1: return WasteDisposalDeliveryType.SOME; + case 2: + default: + return WasteDisposalDeliveryType.NONE; + } + } + + static CargoHandlingType CHTFromNSWEnumeration(byte nswValue) + { + if (nswValue == 0) return CargoHandlingType.LOAD; + return CargoHandlingType.DISCHARGE; + } + + static ShippingAreaType SATFromNSWEnumeration(byte nswValue) + { + switch (nswValue) + { + case 0: return ShippingAreaType.NORTH_BALTIC_SEA; + case 1: return ShippingAreaType.EUROPE; + default: return ShippingAreaType.OVERSEAS; + } + } + + #endregion + + } } diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs index 9c96b24d..803c438a 100644 --- a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs +++ b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs @@ -2,6 +2,6 @@ [assembly: AssemblyCompany("Informatikbüro Daniel Schick")] [assembly: AssemblyProduct("BSMD NSW interface")] -[assembly: AssemblyInformationalVersion("3.0.14")] +[assembly: AssemblyInformationalVersion("3.0.15")] [assembly: AssemblyCopyright("Copyright © 2014-2016 Informatikbüro Daniel Schick. All rights reserved.")] [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 05350d34..f8285c8a 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("3.0.14.*")] +[assembly: AssemblyVersion("3.0.15.*")] diff --git a/nsw/Source/bsmd.hisnord/Request.cs b/nsw/Source/bsmd.hisnord/Request.cs index e30860f3..2e6505dc 100644 --- a/nsw/Source/bsmd.hisnord/Request.cs +++ b/nsw/Source/bsmd.hisnord/Request.cs @@ -664,21 +664,20 @@ namespace bsmd.hisnord if (mdh.AwareOfFurtherInfections.HasValue) _mdh.AwareOfConditionsForFurtherInfections = mdh.AwareOfFurtherInfections.Value ? yorntype.Y : yorntype.N; - // if (mdh.InfectedAreas.Count > 0) - // { + if (mdh.InfectedAreaVisited.HasValue) + _mdh.InfectedAreaVisited = mdh.InfectedAreaVisited ?? false ? yorntype.Y : yorntype.N; + + if (_mdh.InfectedAreaVisited == yorntype.Y) + { _mdh.InfectedAreas = new infectedarea[mdh.InfectedAreas.Count]; for (int i = 0; i < mdh.InfectedAreas.Count; i++) { _mdh.InfectedAreas[i] = new infectedarea(); if (mdh.InfectedAreas[i].InfectedAreaDate.HasValue) _mdh.InfectedAreas[i].InfectedAreaDate = mdh.InfectedAreas[i].InfectedAreaDate.Value; - _mdh.InfectedAreas[i].InfectedAreaPort = mdh.InfectedAreas[i].InfectedAreaPort; + _mdh.InfectedAreas[i].InfectedAreaPort = mdh.InfectedAreas[i].InfectedAreaPort; } - // } - - if (mdh.InfectedAreaVisited.HasValue) - _mdh.InfectedAreaVisited = mdh.InfectedAreaVisited ?? false ? yorntype.Y : yorntype.N; - + } if (mdh.MedicalConsulted.HasValue) _mdh.MedicalConsulted = mdh.MedicalConsulted.Value ? yorntype.Y : yorntype.N;