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