diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj index 4337a873..ae498832 100644 --- a/ENI-2/ENI2/ENI2/ENI2.csproj +++ b/ENI-2/ENI2/ENI2/ENI2.csproj @@ -35,7 +35,7 @@ true publish.html 1 - 6.0.1.%2a + 6.0.2.%2a false true true diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx index a7bf6013..d12f3c20 100644 Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ diff --git a/nsw/Source/bsmd.database/CREW.cs b/nsw/Source/bsmd.database/CREW.cs index 88b51b9c..d7645db5 100644 --- a/nsw/Source/bsmd.database/CREW.cs +++ b/nsw/Source/bsmd.database/CREW.cs @@ -109,7 +109,7 @@ namespace bsmd.database [ShowReport] [ReportDisplayName("Issuing state")] - [Validation(ValidationCode.FLAG_CODE)] + [Validation(ValidationCode.OPTIONAL_FLAG_CODE)] [MaxLength(2)] [ENI2Validation] public string CrewMemberIdentityDocumentIssuingState { get; set; } diff --git a/nsw/Source/bsmd.database/PAS.cs b/nsw/Source/bsmd.database/PAS.cs index 9e95ca34..11767c37 100644 --- a/nsw/Source/bsmd.database/PAS.cs +++ b/nsw/Source/bsmd.database/PAS.cs @@ -118,7 +118,7 @@ namespace bsmd.database [ShowReport] [ReportDisplayName("Issuing state")] - [Validation(ValidationCode.FLAG_CODE)] + [Validation(ValidationCode.OPTIONAL_FLAG_CODE)] [ENI2Validation] public string PassengerIdentityDocumentIssuingState { get; set; } diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs index fdaaade5..08b4bb36 100644 --- a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs +++ b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs @@ -2,6 +2,6 @@ [assembly: AssemblyCompany("schick Informatik")] [assembly: AssemblyProduct("BSMD NSW interface")] -[assembly: AssemblyInformationalVersion("6.0.1")] +[assembly: AssemblyInformationalVersion("6.0.2")] [assembly: AssemblyCopyright("Copyright © 2014-2020 schick Informatik")] [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 20efc0c1..4738d632 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("6.0.1.*")] +[assembly: AssemblyVersion("6.0.2.*")] diff --git a/nsw/Source/bsmd.database/RuleEngine.cs b/nsw/Source/bsmd.database/RuleEngine.cs index 5f7d75f2..2f5b05e3 100644 --- a/nsw/Source/bsmd.database/RuleEngine.cs +++ b/nsw/Source/bsmd.database/RuleEngine.cs @@ -281,6 +281,15 @@ namespace bsmd.database errors.Add(RuleEngine.CreateError(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename)); } break; + case ValidationCode.OPTIONAL_FLAG_CODE: + { + if(!value.IsNullOrEmpty()) + { + if (!RuleEngine.NationalityChecker(value)) + errors.Add(RuleEngine.CreateError(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename)); + } + } + break; case ValidationCode.TWO_DIGIT: { Regex rgx = new Regex("[0-9]{2}"); diff --git a/nsw/Source/bsmd.database/ValidationAttribute.cs b/nsw/Source/bsmd.database/ValidationAttribute.cs index c0f3dec6..f9c34d7b 100644 --- a/nsw/Source/bsmd.database/ValidationAttribute.cs +++ b/nsw/Source/bsmd.database/ValidationAttribute.cs @@ -47,6 +47,7 @@ namespace bsmd.database TRUNCATE = 28, MMSI = 29, INVALID_NUMBER_CHARS = 30, + OPTIONAL_FLAG_CODE, E121 = 121, E122 = 122, E123 = 123,