Neue PatchVersion 25.10.15
This commit is contained in:
parent
ab5e751720
commit
167451f545
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<StartArguments>-r -c "AA9074D7-2607-445E-A0B9-D07890B6DC23"</StartArguments>
|
||||
<StartArguments>-r -c "8ECF90D2-1F1F-4CDD-A7C7-8E1BB3EF7105"</StartArguments>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -32,18 +32,18 @@ namespace bsmd.database
|
||||
[ShowReport]
|
||||
public string PortFacilityPortLoCode { get; set; }
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public DateTime? PortFacilityDateOfArrival { get; set; }
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public DateTime? PortFacilityDateOfDeparture { get; set; }
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.NOT_NULL)]
|
||||
[Validation(ValidationCode.NOT_NULL)]
|
||||
public byte? PortFacilityShipSecurityLevel { get; set; }
|
||||
[ShowReport]
|
||||
public string PortFacilitySecurityMattersToReport { get; set; }
|
||||
[ShowReport]
|
||||
[Validation2(ValidationCode.GISIS)]
|
||||
[Validation(ValidationCode.GISIS)]
|
||||
public string PortFacilityGISISCode { get; set; }
|
||||
|
||||
public string Identifier { get; set; }
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("2.4.0")]
|
||||
[assembly: AssemblyInformationalVersion("2.4.1")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2015 Informatikbüro Daniel Schick. All rights reserved.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -4,6 +4,6 @@
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("2.4.0.*")]
|
||||
[assembly: AssemblyVersion("2.4.1.*")]
|
||||
// wenn das nicht auskommentiert wird erhalten wir eine Warnung
|
||||
// [assembly: AssemblyFileVersion("1.0.0.*")]
|
||||
|
||||
@ -224,6 +224,8 @@ namespace bsmd.database
|
||||
newWaste.WasteCapacity_MTQ = 0;
|
||||
newWaste.WasteDisposalAmount_MTQ = 0;
|
||||
newWaste.Identifier = "";
|
||||
newWaste.WasteDisposalPort = "ZZUKN";
|
||||
newWaste.WasteDescription = "-";
|
||||
newWaste.WAS = this;
|
||||
this.Waste.Add(newWaste);
|
||||
result.Add(newWaste);
|
||||
|
||||
@ -895,12 +895,21 @@ namespace bsmd.dbh
|
||||
{
|
||||
RootHAZA rootHAZA = new RootHAZA();
|
||||
HAZ haz = message.Elements[0] as HAZ;
|
||||
rootHAZA.Items = new object[4];
|
||||
|
||||
if(haz.DPGManifestOnBoardOnArrival.HasValue)
|
||||
rootHAZA.Items[0] = haz.DPGManifestOnBoardOnArrival.Value ? RootHAZADPGManifestOnBoardOnArrival.Y : RootHAZADPGManifestOnBoardOnArrival.N;
|
||||
if (haz.NoDPGOnBoardOnArrival ?? false)
|
||||
{
|
||||
rootHAZA.Items = new object[1];
|
||||
rootHAZA.Items[0] = RootHAZANoDPGOnBoardOnArrival.Y;
|
||||
}
|
||||
else
|
||||
{
|
||||
rootHAZA.Items = new object[3];
|
||||
|
||||
// if(haz.DPGManifestOnBoardOnArrival.HasValue)
|
||||
rootHAZA.Items[0] = (haz.DPGManifestOnBoardOnArrival ?? false) ? RootHAZADPGManifestOnBoardOnArrival.Y : RootHAZADPGManifestOnBoardOnArrival.N;
|
||||
|
||||
#region HAZ positions
|
||||
|
||||
RootHAZADPGOnArrival dpgOnArrival = new RootHAZADPGOnArrival();
|
||||
|
||||
#region IMDG
|
||||
@ -920,7 +929,7 @@ namespace bsmd.dbh
|
||||
rootIMDG.CompatibilityGroup = imdgPos.CompatibilityGroup;
|
||||
rootIMDG.TechnicalName = imdgPos.TechnicalName;
|
||||
rootIMDG.NetExplosiveMass_KGMSpecified = imdgPos.NetExplosiveMass_KGM.HasValue;
|
||||
if(imdgPos.NetExplosiveMass_KGM.HasValue)
|
||||
if (imdgPos.NetExplosiveMass_KGM.HasValue)
|
||||
rootIMDG.NetExplosiveMass_KGM = (float)imdgPos.NetExplosiveMass_KGM.Value;
|
||||
rootIMDG.Flashpoint_CEL = imdgPos.Flashpoint_CEL;
|
||||
rootIMDG.Class7NuclideName = imdgPos.Class7NuclideName;
|
||||
@ -932,7 +941,7 @@ namespace bsmd.dbh
|
||||
rootIMDG.Class7Category = imdgPos.Class7Category.Value;
|
||||
rootIMDG.Class7TransportIndexSpecified = imdgPos.Class7TransportIndex.HasValue;
|
||||
if (imdgPos.Class7TransportIndex.HasValue)
|
||||
rootIMDG.Class7TransportIndex = (float) imdgPos.Class7TransportIndex.Value;
|
||||
rootIMDG.Class7TransportIndex = (float)imdgPos.Class7TransportIndex.Value;
|
||||
rootIMDG.Class7CSISpecified = imdgPos.Class7CSI.HasValue;
|
||||
if (imdgPos.Class7CSI.HasValue)
|
||||
rootIMDG.Class7CSI = imdgPos.Class7CSI.Value;
|
||||
@ -948,12 +957,12 @@ namespace bsmd.dbh
|
||||
for (int sCount = 0; sCount < imdgPos.SubsidiaryRiskList.Count; sCount++)
|
||||
rootIMDG.SubsidiaryRisks[sCount] = imdgPos.SubsidiaryRiskList[sCount].SubsidiaryRisk;
|
||||
}
|
||||
if(imdgPos.MarinePollutant.HasValue)
|
||||
if (imdgPos.MarinePollutant.HasValue)
|
||||
rootIMDG.MarinePollutant = imdgPos.MarinePollutant.Value ? RootHAZADPGOnArrivalDPGItemIMDGMarinePollutant.Y : RootHAZADPGOnArrivalDPGItemIMDGMarinePollutant.N;
|
||||
if (imdgPos.NumberOfPackages.HasValue)
|
||||
rootIMDG.NumberOfPackages = imdgPos.NumberOfPackages.Value;
|
||||
rootIMDG.PackageType = imdgPos.PackageType;
|
||||
if(imdgPos.LimitedQuantities.HasValue)
|
||||
if (imdgPos.LimitedQuantities.HasValue)
|
||||
rootIMDG.LimitedQuantities = imdgPos.LimitedQuantities.Value ? RootHAZADPGOnArrivalDPGItemIMDGLimitedQuantities.Y : RootHAZADPGOnArrivalDPGItemIMDGLimitedQuantities.N;
|
||||
if (imdgPos.ExceptedQuantities.HasValue)
|
||||
rootIMDG.ExceptedQuantities = imdgPos.ExceptedQuantities.Value ? RootHAZADPGOnArrivalDPGItemIMDGExceptedQuantities.Y : RootHAZADPGOnArrivalDPGItemIMDGExceptedQuantities.N;
|
||||
@ -985,13 +994,13 @@ namespace bsmd.dbh
|
||||
if (haz.IBCPositions.Count > 0)
|
||||
{
|
||||
dpgOnArrival.DPGItemIBC = new RootHAZADPGOnArrivalDPGItemIBC[haz.IBCPositions.Count];
|
||||
for(int i=0;i<haz.IBCPositions.Count;i++)
|
||||
for (int i = 0; i < haz.IBCPositions.Count; i++)
|
||||
{
|
||||
RootHAZADPGOnArrivalDPGItemIBC rootIBC = new RootHAZADPGOnArrivalDPGItemIBC();
|
||||
IBCPosition ibcPos = haz.IBCPositions[i];
|
||||
|
||||
rootIBC.ProductName = ibcPos.ProductName;
|
||||
if(ibcPos.PollutionCategory.HasValue)
|
||||
if (ibcPos.PollutionCategory.HasValue)
|
||||
rootIBC.PollutionCategory = (RootHAZADPGOnArrivalDPGItemIBCPollutionCategory)ibcPos.PollutionCategory.Value;
|
||||
rootIBC.HazardsSpecified = ibcPos.Hazards.HasValue;
|
||||
if (ibcPos.Hazards.HasValue)
|
||||
@ -1090,16 +1099,15 @@ namespace bsmd.dbh
|
||||
#endregion
|
||||
|
||||
rootHAZA.Items[1] = dpgOnArrival;
|
||||
|
||||
#endregion
|
||||
|
||||
if (haz.INFShipClass.HasValue)
|
||||
{
|
||||
RootHAZAINFShipClass infShipClass = (RootHAZAINFShipClass) haz.INFShipClass.Value;
|
||||
RootHAZAINFShipClass infShipClass = (RootHAZAINFShipClass)haz.INFShipClass.Value;
|
||||
rootHAZA.Items[2] = infShipClass;
|
||||
}
|
||||
|
||||
if (haz.NoDPGOnBoardOnArrival ?? false)
|
||||
rootHAZA.Items[3] = RootHAZANoDPGOnBoardOnArrival.Y;
|
||||
}
|
||||
|
||||
item = rootHAZA;
|
||||
}
|
||||
@ -1112,12 +1120,22 @@ namespace bsmd.dbh
|
||||
{
|
||||
RootHAZD rootHAZD = new RootHAZD();
|
||||
HAZ haz = message.Elements[0] as HAZ;
|
||||
rootHAZD.Items = new object[4];
|
||||
|
||||
if (haz.NoDPGOnBoardOnArrival ?? false)
|
||||
{
|
||||
rootHAZD.Items = new object[1];
|
||||
rootHAZD.Items[3] = RootHAZDNoDPGOnBoardOnDeparture.Y;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
rootHAZD.Items = new object[3];
|
||||
|
||||
if (haz.DPGManifestOnBoardOnArrival.HasValue)
|
||||
rootHAZD.Items[0] = haz.DPGManifestOnBoardOnArrival.Value ? RootHAZDDPGManifestOnBoardOnDeparture.Y : RootHAZDDPGManifestOnBoardOnDeparture.N;
|
||||
|
||||
#region HAZ positions
|
||||
|
||||
RootHAZDDPGOnDeparture dpgOnDeparture = new RootHAZDDPGOnDeparture();
|
||||
|
||||
#region IMDG
|
||||
@ -1307,6 +1325,7 @@ namespace bsmd.dbh
|
||||
#endregion
|
||||
|
||||
rootHAZD.Items[1] = dpgOnDeparture;
|
||||
|
||||
#endregion
|
||||
|
||||
if (haz.INFShipClass.HasValue)
|
||||
@ -1315,8 +1334,8 @@ namespace bsmd.dbh
|
||||
rootHAZD.Items[2] = infShipClass;
|
||||
}
|
||||
|
||||
if (haz.NoDPGOnBoardOnArrival ?? false)
|
||||
rootHAZD.Items[3] = RootHAZDNoDPGOnBoardOnDeparture.Y;
|
||||
}
|
||||
|
||||
|
||||
item = rootHAZD;
|
||||
}
|
||||
|
||||
@ -35,11 +35,13 @@ namespace bsmd.herberg.FormService
|
||||
this.EventLog.Log = "Application";
|
||||
this.Init(args);
|
||||
this.EventLog.WriteEntry("FormService started.", EventLogEntryType.Information);
|
||||
this._log.Info("Starting EU-NOAD FormService.");
|
||||
this.DoOnce();
|
||||
}
|
||||
|
||||
protected override void OnStop()
|
||||
{
|
||||
this._log.Info("Stopping EU-NOAD FormService.");
|
||||
}
|
||||
|
||||
public void Init(string[] args)
|
||||
|
||||
@ -6,12 +6,7 @@ using System.Runtime.InteropServices;
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("bsmd.herberg.FormService")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("bsmd.herberg.FormService")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyDescription("Imports Herberg Fleettracker form data")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
@ -21,16 +16,3 @@ using System.Runtime.InteropServices;
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("663d14d2-42ce-4efd-9915-82254b211d81")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
@ -651,9 +651,11 @@ namespace bsmd.herberg.FormService
|
||||
#region CREW
|
||||
case "CREW":
|
||||
{
|
||||
Dictionary<string, string> keysInMessage = new Dictionary<string, string>();
|
||||
foreach (int key in nDict.Keys)
|
||||
{
|
||||
Dictionary<string, string> pDict = nDict[key];
|
||||
keysInMessage.Add(key.ToString(), key.ToString());
|
||||
CREW crew = theMessage.GetSublistElementWithIdentifier(key.ToString()) as CREW;
|
||||
if (crew == null)
|
||||
{
|
||||
@ -680,9 +682,18 @@ namespace bsmd.herberg.FormService
|
||||
{
|
||||
_log.ErrorFormat("Error reading CREW fields: {0}", ex.Message);
|
||||
}
|
||||
|
||||
saveMessages.Add(crew);
|
||||
}
|
||||
// check for missing messages (crew deleted in EU-NOAD)
|
||||
foreach (CREW crew in theMessage.Elements)
|
||||
{
|
||||
if (!keysInMessage.ContainsKey(crew.Identifier))
|
||||
{
|
||||
_log.InfoFormat("CREW {0} {1}, Ident {2} not found in EU-NOAD message, removing!",
|
||||
crew.CrewMemberLastName ?? "", crew.CrewMemberFirstName ?? "", crew.Identifier);
|
||||
DBManager.Instance.Delete(crew);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
@ -816,9 +827,11 @@ namespace bsmd.herberg.FormService
|
||||
#region PAS
|
||||
case "PAS":
|
||||
{
|
||||
Dictionary<string, string> keysInMessage = new Dictionary<string, string>();
|
||||
foreach (int key in nDict.Keys)
|
||||
{
|
||||
Dictionary<string, string> pDict = nDict[key];
|
||||
keysInMessage.Add(key.ToString(), key.ToString());
|
||||
PAS pas = theMessage.GetSublistElementWithIdentifier(key.ToString()) as PAS;
|
||||
if (pas == null)
|
||||
{
|
||||
@ -852,6 +865,16 @@ namespace bsmd.herberg.FormService
|
||||
|
||||
saveMessages.Add(pas);
|
||||
}
|
||||
// check for missing messages (passenger deleted in EU-NOAD)
|
||||
foreach (PAS pas in theMessage.Elements)
|
||||
{
|
||||
if (!keysInMessage.ContainsKey(pas.Identifier))
|
||||
{
|
||||
_log.InfoFormat("PAS {0} {1}, Ident {2} not found in EU-NOAD message, removing!",
|
||||
pas.PassengerLastName ?? "", pas.PassengerFirstName ?? "", pas.Identifier);
|
||||
DBManager.Instance.Delete(pas);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
|
||||
@ -62,6 +62,15 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\bsmd.database\Properties\AssemblyProductInfo.cs">
|
||||
<Link>Properties\AssemblyProductInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\bsmd.database\Properties\AssemblyProjectInfo.cs">
|
||||
<Link>Properties\AssemblyProjectInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\bsmd.database\Properties\AssemblyProjectKeyInfo.cs">
|
||||
<Link>Properties\AssemblyProjectKeyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Enums.cs" />
|
||||
<Compile Include="FormService.cs">
|
||||
<SubType>Component</SubType>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user