Compare commits
5 Commits
b2062c3227
...
63aca94ec4
| Author | SHA1 | Date | |
|---|---|---|---|
| 63aca94ec4 | |||
| 071b0ff5ee | |||
| 006a253fd7 | |||
| 0d80f6e514 | |||
| b1051546b7 |
@ -36,8 +36,8 @@
|
||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>3</ApplicationRevision>
|
||||
<ApplicationVersion>7.2.6.0</ApplicationVersion>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationVersion>7.2.6.2</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
@ -85,13 +85,13 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<ManifestCertificateThumbprint>FE53D3ADE2DCE4BD171A899FF41D43E63FEA7639</ManifestCertificateThumbprint>
|
||||
<ManifestCertificateThumbprint>C5FD306818D481FBECE3B2E74D7A912F515191E0</ManifestCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignManifests>true</SignManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestKeyFile>ENI2_6_TemporaryKey.pfx</ManifestKeyFile>
|
||||
<ManifestKeyFile>ENI2_7_TemporaryKey.pfx</ManifestKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 64|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -851,6 +851,7 @@
|
||||
<None Include="ENI2_4_TemporaryKey.pfx" />
|
||||
<None Include="ENI2_5_TemporaryKey.pfx" />
|
||||
<None Include="ENI2_6_TemporaryKey.pfx" />
|
||||
<None Include="ENI2_7_TemporaryKey.pfx" />
|
||||
<None Include="Service References\LockingServiceReference\ENI2.LockingServiceReference.CoreLock.datasource">
|
||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||
</None>
|
||||
@ -1083,7 +1084,7 @@
|
||||
<SignToolPath Condition="'$(SignToolPath)' == '' And '$(SignToolPathBase)' != ''">$(SignToolPathBase)$(Platform)\</SignToolPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>"$(SignToolPath)signtool.exe" sign /f $(ProjectDir)\ENI2_6_TemporaryKey.pfx /p FgrMFUWsTVGQeb6L6i0e /fd SHA256 $(TargetPath)</PostBuildEvent>
|
||||
<PostBuildEvent>"$(SignToolPath)signtool.exe" sign /f $(ProjectDir)\ENI2_7_TemporaryKey.pfx /p FgrMFUWsTVGQeb6L6i0e /fd SHA256 $(TargetPath)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
||||
BIN
ENI2/ENI2_7_TemporaryKey.pfx
Normal file
BIN
ENI2/ENI2_7_TemporaryKey.pfx
Normal file
Binary file not shown.
@ -740,7 +740,7 @@ namespace ENI2.Excel
|
||||
pas.PassengerLastName = lastName;
|
||||
pas.PassengerFirstName = reader.ReadCellAsText("passenger departure", string.Format("C{0}", i + 16));
|
||||
pas.PassengerPlaceOfBirth = reader.ReadCellAsText("passenger departure", string.Format("D{0}", i + 16));
|
||||
pas.PassengerCountryOfBirth = ExcelUtil.ReadNationality(reader.ReadCellAsText("passenger departure", string.Format("E{0}", i + 16)), out bool canceled);
|
||||
pas.PassengerCountryOfBirth = ExcelUtil.ReadNationality(reader.ReadCellAsText("passenger departure", string.Format("E{0}", i + 16)), out bool canceled, false);
|
||||
if (canceled) return false;
|
||||
pas.PassengerDateOfBirth = reader.ReadCellAsDateTime("passenger departure", string.Format("F{0}", i + 16));
|
||||
pas.PassengerGender = ParseGender(reader.ReadCellAsText("passenger departure", string.Format("G{0}", i + 16)));
|
||||
@ -802,7 +802,7 @@ namespace ENI2.Excel
|
||||
pas.PassengerLastName = lastName;
|
||||
pas.PassengerFirstName = reader.ReadCellAsText("passenger arrival", string.Format("C{0}", i + 16));
|
||||
pas.PassengerPlaceOfBirth = reader.ReadCellAsText("passenger arrival", string.Format("D{0}", i + 16));
|
||||
pas.PassengerCountryOfBirth = ExcelUtil.ReadNationality(reader.ReadCellAsText("passenger arrival", string.Format("E{0}", i + 16)), out bool canceled);
|
||||
pas.PassengerCountryOfBirth = ExcelUtil.ReadNationality(reader.ReadCellAsText("passenger arrival", string.Format("E{0}", i + 16)), out bool canceled, false);
|
||||
if (canceled) return false;
|
||||
pas.PassengerDateOfBirth = reader.ReadCellAsDateTime("passenger arrival", string.Format("F{0}", i + 16));
|
||||
pas.PassengerGender = ParseGender(reader.ReadCellAsText("passenger arrival", string.Format("G{0}", i + 16)));
|
||||
@ -1207,7 +1207,7 @@ namespace ENI2.Excel
|
||||
crew.CrewMemberLastName = lastName;
|
||||
crew.CrewMemberFirstName = reader.ReadCellAsText("crew departure", string.Format("C{0}", i + 15));
|
||||
crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText("crew departure", string.Format("D{0}", i + 15));
|
||||
crew.CrewMemberCountryOfBirth = ExcelUtil.ReadNationality(reader.ReadCellAsText("crew departure", string.Format("E{0}", i + 15)), out bool canceled);
|
||||
crew.CrewMemberCountryOfBirth = ExcelUtil.ReadNationality(reader.ReadCellAsText("crew departure", string.Format("E{0}", i + 15)), out bool canceled, false);
|
||||
if (canceled) return false;
|
||||
crew.CrewMemberDateOfBirth = reader.ReadCellAsDateTime("crew departure", string.Format("F{0}", i + 15));
|
||||
string gender = reader.ReadCellAsText("crew departure", string.Format("G{0}", i + 15));
|
||||
@ -1257,7 +1257,7 @@ namespace ENI2.Excel
|
||||
crew.CrewMemberLastName = lastName;
|
||||
crew.CrewMemberFirstName = reader.ReadCellAsText("crew arrival", string.Format("C{0}", i + 15));
|
||||
crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText("crew arrival", string.Format("D{0}", i + 15));
|
||||
crew.CrewMemberCountryOfBirth = ExcelUtil.ReadNationality(reader.ReadCellAsText("crew arrival", string.Format("E{0}", i + 15)), out bool canceled);
|
||||
crew.CrewMemberCountryOfBirth = ExcelUtil.ReadNationality(reader.ReadCellAsText("crew arrival", string.Format("E{0}", i + 15)), out bool canceled, false);
|
||||
if (canceled) return false;
|
||||
crew.CrewMemberDateOfBirth = reader.ReadCellAsDateTime("crew arrival", string.Format("F{0}", i + 15));
|
||||
string gender = reader.ReadCellAsText("crew arrival", string.Format("G{0}", i + 15));
|
||||
|
||||
@ -2133,7 +2133,7 @@ namespace ENI2.Excel
|
||||
crew.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18)), out canceled);
|
||||
if (canceled) return true;
|
||||
crew.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 18), 100);
|
||||
crew.CrewMemberCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("I{0}", i + 18)), out _);
|
||||
crew.CrewMemberCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("I{0}", i + 18)), out _, false);
|
||||
|
||||
crew.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("J{0}", i + 18));
|
||||
|
||||
@ -2252,7 +2252,7 @@ namespace ENI2.Excel
|
||||
crewd.CrewMemberNationality = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("G{0}", i + 18)), out canceled);
|
||||
if (canceled) return true;
|
||||
crewd.CrewMemberPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("H{0}", i + 18), 100);
|
||||
crewd.CrewMemberCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("I{0}", i + 18)), out _);
|
||||
crewd.CrewMemberCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("I{0}", i + 18)), out _, false);
|
||||
crewd.CrewMemberDateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("J{0}", i + 18));
|
||||
|
||||
crewd.CrewMemberIdentityDocumentType = ReadDocumentType(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 18)), out canceled);
|
||||
@ -2374,7 +2374,7 @@ namespace ENI2.Excel
|
||||
pas.PassengerInTransit = reader.ReadCellAsBool(sheetTitle, string.Format("H{0}", i + 17));
|
||||
|
||||
pas.PassengerPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 17), 100);
|
||||
pas.PassengerCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 17)), out _);
|
||||
pas.PassengerCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 17)), out _, false);
|
||||
|
||||
if (canceled) return true;
|
||||
DateTime? dateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("L{0}", i + 17));
|
||||
@ -2515,7 +2515,7 @@ namespace ENI2.Excel
|
||||
pas.PassengerInTransit = reader.ReadCellAsBool(sheetTitle, string.Format("H{0}", i + 18));
|
||||
|
||||
pas.PassengerPlaceOfBirth = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", i + 18), 100);
|
||||
pas.PassengerCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 18)), out _);
|
||||
pas.PassengerCountryOfBirth = ReadNationality(reader.ReadCellAsText(sheetTitle, string.Format("K{0}", i + 18)), out _, false);
|
||||
|
||||
if (canceled) return true;
|
||||
DateTime? dateOfBirth = reader.ReadCellAsDateTime(sheetTitle, string.Format("L{0}", i + 18));
|
||||
@ -2848,12 +2848,12 @@ namespace ENI2.Excel
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string ReadNationality(string nationality, out bool canceled)
|
||||
public static string ReadNationality(string nationality, out bool canceled, bool setPlaceHolder = true)
|
||||
{
|
||||
string result = null;
|
||||
canceled = false;
|
||||
nationality = nationality.Trim();
|
||||
if (nationality.IsNullOrEmpty())
|
||||
if (nationality.IsNullOrEmpty() && setPlaceHolder)
|
||||
{
|
||||
result = "XX";
|
||||
}
|
||||
@ -2870,6 +2870,8 @@ namespace ENI2.Excel
|
||||
result = ValueMapping.Dicts[ValueMapping.MappingType.COUNTRY][nationality].Value;
|
||||
}
|
||||
else // we cannot find whatever this is..
|
||||
{
|
||||
if (setPlaceHolder) // only show import dialog if this is a required field..
|
||||
{
|
||||
FixImportDialog fid = new FixImportDialog();
|
||||
fid.Value = nationality;
|
||||
@ -2879,11 +2881,11 @@ namespace ENI2.Excel
|
||||
{
|
||||
if (!fid.SelectedValue.IsNullOrEmpty())
|
||||
{
|
||||
if(!ValueMapping.InvalidKeys[ValueMapping.MappingType.COUNTRY].Contains(nationality))
|
||||
if (!ValueMapping.InvalidKeys[ValueMapping.MappingType.COUNTRY].Contains(nationality))
|
||||
{
|
||||
string selectedValue = fid.SelectedValue;
|
||||
Task<bool> createResult = Task.Run(async () => await ValueMapping.Create(ValueMapping.MappingType.COUNTRY, nationality, selectedValue));
|
||||
if(!createResult.Result)
|
||||
if (!createResult.Result)
|
||||
_log.WarnFormat("Error saving nationality value mapping {0} -> {1}", nationality, selectedValue);
|
||||
}
|
||||
else
|
||||
@ -2902,6 +2904,7 @@ namespace ENI2.Excel
|
||||
canceled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -48,7 +48,6 @@ namespace bsmd.database
|
||||
[ENI2Validation]
|
||||
public string CrewMemberPlaceOfBirth { get; set; }
|
||||
|
||||
[Validation(ValidationCode.FLAG_CODE)]
|
||||
[MaxLength(2)]
|
||||
[ENI2Validation]
|
||||
public string CrewMemberCountryOfBirth { get; set; }
|
||||
|
||||
@ -266,6 +266,10 @@ namespace bsmd.database
|
||||
|
||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
{
|
||||
|
||||
if(this.Quantity_KGM >= 1000000000)
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
|
||||
if (this.FlashpointInformation.HasValue && (this.FlashpointInformation.Value == 2) &&
|
||||
this.Flashpoint_CEL.IsNullOrEmpty())
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V804, "Flashpoint_CEL", null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
|
||||
@ -201,6 +201,9 @@ namespace bsmd.database
|
||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
{
|
||||
|
||||
if(this.Quantity_KGM >= 1000000000)
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
|
||||
if (!this.UNNumber.IsNullOrEmpty() && !unNumberRegex.IsMatch(this.UNNumber))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "UNNumber", null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
|
||||
|
||||
@ -499,7 +499,7 @@ namespace bsmd.database
|
||||
if((this.NetQuantity_KGM >= 1000000000) ||
|
||||
(this.GrossQuantity_KGM >= 1000000000) ||
|
||||
(this.Volume_MTQ >= 1000000000))
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V809, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
|
||||
|
||||
foreach (SubsidiaryRisks sr in this.SubsidiaryRiskList)
|
||||
|
||||
@ -235,7 +235,10 @@ namespace bsmd.database
|
||||
|
||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
{
|
||||
if(!MHB ?? false)
|
||||
if(this.Quantity_KGM >= 1000000000)
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
|
||||
if (!MHB ?? false)
|
||||
{
|
||||
if(this.UNNumber.IsNullOrEmpty())
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V803, "UNNumber", this.UNNumber, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
|
||||
@ -188,6 +188,9 @@ namespace bsmd.database
|
||||
|
||||
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
|
||||
{
|
||||
if (this.Quantity_KGM >= 1000000000)
|
||||
errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, null, null, this.Title, this.Identifier, this.HAZ.IsDeparture ? "HAZD" : "HAZA"));
|
||||
|
||||
if (this.FlashpointInformation.HasValue && (this.FlashpointInformation.Value == 2) &&
|
||||
this.Flashpoint_CEL.IsNullOrEmpty())
|
||||
violations.Add(RuleEngine.CreateViolation(ValidationCode.V804, "Flashpoint_CEL", null, this.Title, this.Identifier,
|
||||
|
||||
@ -150,7 +150,6 @@ namespace bsmd.database
|
||||
[ENI2Validation]
|
||||
public bool? NotificationPAX { get; set; }
|
||||
|
||||
[Validation(ValidationCode.FLAG_CODE)]
|
||||
[MaxLength(2)]
|
||||
[ENI2Validation]
|
||||
public string PassengerCountryOfBirth { get; set; }
|
||||
|
||||
@ -249,7 +249,7 @@ namespace bsmd.dbh.Request
|
||||
{
|
||||
|
||||
/// <remarks/>
|
||||
[System.Xml.Serialization.XmlEnumAttribute("7.2")]
|
||||
[System.Xml.Serialization.XmlEnumAttribute("7.2.1")]
|
||||
Item72,
|
||||
}
|
||||
|
||||
|
||||
@ -4,9 +4,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
using bsmd.database;
|
||||
using log4net;
|
||||
@ -26,7 +23,7 @@ namespace bsmd.dbh
|
||||
{
|
||||
Root root = new Root();
|
||||
root.Version = RootVersion.Item72;
|
||||
root.SourceDocumentVersion = "7.2";
|
||||
root.SourceDocumentVersion = "7.2.1";
|
||||
root.Timestamp = DateTime.Now;
|
||||
string filenameComponent;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user