3.0.15 Korrekturversion Dakosy / HIS-Nord

This commit is contained in:
Daniel Schick 2016-05-03 06:06:11 +00:00
parent fb436f8536
commit a52232cff1
6 changed files with 48 additions and 14 deletions

Binary file not shown.

Binary file not shown.

View File

@ -260,7 +260,7 @@ namespace bsmd.dakosy
vList.Visit[0].LADG[i].CargoCode.Value = ladg.CargoCodeNST; vList.Visit[0].LADG[i].CargoCode.Value = ladg.CargoCodeNST;
vList.Visit[0].LADG[i].CargoHandlingTypeSpecified = ladg.CargoHandlingType.HasValue; vList.Visit[0].LADG[i].CargoHandlingTypeSpecified = ladg.CargoHandlingType.HasValue;
byte ht = ladg.CargoHandlingType ?? 0; 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].CargoGrossQuantityTNESpecified = ladg.CargoGrossQuantity_TNE.HasValue;
vList.Visit[0].LADG[i].CargoGrossQuantityTNE = (double) (ladg.CargoGrossQuantity_TNE ?? 0); vList.Visit[0].LADG[i].CargoGrossQuantityTNE = (double) (ladg.CargoGrossQuantity_TNE ?? 0);
vList.Visit[0].LADG[i].CargoNumberOfItemsSpecified = ladg.CargoNumberOfItems.HasValue; vList.Visit[0].LADG[i].CargoNumberOfItemsSpecified = ladg.CargoNumberOfItems.HasValue;
@ -313,8 +313,8 @@ namespace bsmd.dakosy
case Message.NotificationClass.INFO: case Message.NotificationClass.INFO:
bsmd.database.INFO info = aMessage.Elements[0] as bsmd.database.INFO; bsmd.database.INFO info = aMessage.Elements[0] as bsmd.database.INFO;
vList.Visit[0].INFO = new INFO(); vList.Visit[0].INFO = new INFO();
if(info.ShippingArea.HasValue) if (info.ShippingArea.HasValue)
vList.Visit[0].INFO.ShippingArea = (ShippingAreaType)info.ShippingArea.Value; vList.Visit[0].INFO.ShippingArea = SATFromNSWEnumeration(info.ShippingArea.Value);
vList.Visit[0].INFO.RequestedPositionInPortOfCall = info.RequestedPositionInPortOfCall; vList.Visit[0].INFO.RequestedPositionInPortOfCall = info.RequestedPositionInPortOfCall;
vList.Visit[0].INFO.SpecialRequirementsOfShipAtBerth = info.SpecialRequirementsOfShipAtBerth; vList.Visit[0].INFO.SpecialRequirementsOfShipAtBerth = info.SpecialRequirementsOfShipAtBerth;
vList.Visit[0].INFO.ConstructionCharacteristicsOfShip = info.ConstructionCharacteristicsOfShip; vList.Visit[0].INFO.ConstructionCharacteristicsOfShip = info.ConstructionCharacteristicsOfShip;
@ -731,7 +731,7 @@ namespace bsmd.dakosy
} }
vList.Visit[0].WAS.WasteDisposalDeliverySpecified = was.WasteDisposalDelivery.HasValue; vList.Visit[0].WAS.WasteDisposalDeliverySpecified = was.WasteDisposalDelivery.HasValue;
byte wdd = was.WasteDisposalDelivery ?? 0; byte wdd = was.WasteDisposalDelivery ?? 0;
vList.Visit[0].WAS.WasteDisposalDelivery = (WasteDisposalDeliveryType) wdd; vList.Visit[0].WAS.WasteDisposalDelivery = WDDTypeFromNSWEnumeration(wdd);
if (was.Waste.Count > 0) if (was.Waste.Count > 0)
{ {
vList.Visit[0].WAS.Waste = new Waste[was.Waste.Count]; vList.Visit[0].WAS.Waste = new Waste[was.Waste.Count];
@ -952,6 +952,10 @@ namespace bsmd.dakosy
#endregion #endregion
#region static enumeration correction funcs
// all das nur weil die Blödmänner andere Enums angelegt haben!!!
static IdentityDocumentType CrewDocumentFromNSWEnumeration(byte nswValue) static IdentityDocumentType CrewDocumentFromNSWEnumeration(byte nswValue)
{ {
switch(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
} }
} }

View File

@ -2,6 +2,6 @@
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")] [assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
[assembly: AssemblyProduct("BSMD NSW interface")] [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: AssemblyCopyright("Copyright © 2014-2016 Informatikbüro Daniel Schick. All rights reserved.")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]

View File

@ -1,4 +1,4 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("3.0.14.*")] [assembly: AssemblyVersion("3.0.15.*")]

View File

@ -664,21 +664,20 @@ namespace bsmd.hisnord
if (mdh.AwareOfFurtherInfections.HasValue) if (mdh.AwareOfFurtherInfections.HasValue)
_mdh.AwareOfConditionsForFurtherInfections = mdh.AwareOfFurtherInfections.Value ? yorntype.Y : yorntype.N; _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]; _mdh.InfectedAreas = new infectedarea[mdh.InfectedAreas.Count];
for (int i = 0; i < mdh.InfectedAreas.Count; i++) for (int i = 0; i < mdh.InfectedAreas.Count; i++)
{ {
_mdh.InfectedAreas[i] = new infectedarea(); _mdh.InfectedAreas[i] = new infectedarea();
if (mdh.InfectedAreas[i].InfectedAreaDate.HasValue) if (mdh.InfectedAreas[i].InfectedAreaDate.HasValue)
_mdh.InfectedAreas[i].InfectedAreaDate = mdh.InfectedAreas[i].InfectedAreaDate.Value; _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) if (mdh.MedicalConsulted.HasValue)
_mdh.MedicalConsulted = mdh.MedicalConsulted.Value ? yorntype.Y : yorntype.N; _mdh.MedicalConsulted = mdh.MedicalConsulted.Value ? yorntype.Y : yorntype.N;