From fd34b2b23ababf5ad9e4884a62d5731856842d39 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Tue, 8 Feb 2022 07:37:18 +0100 Subject: [PATCH] 6.9.17: Bugfix Konvertierung Flag in Uppercase beim Import --- ENI2/App.config | 6 ++---- ENI2/ENI2.csproj | 2 +- ENI2/Excel/ExcelReader.cs | 10 +++++++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ENI2/App.config b/ENI2/App.config index 79935b33..6105b6f2 100644 --- a/ENI2/App.config +++ b/ENI2/App.config @@ -26,12 +26,10 @@ 1000 - http://heupferd/bsmd.LockingService/LockingService.svc - + http://192.168.2.24/LockingService/LockingService.svc - - Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=E:\DATA\DB\NSW.MDF;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False + Initial Catalog=nswtest;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj index 8b394b3f..29939f64 100644 --- a/ENI2/ENI2.csproj +++ b/ENI2/ENI2.csproj @@ -37,7 +37,7 @@ true publish.html 0 - 6.9.16.0 + 6.9.17.0 false true true diff --git a/ENI2/Excel/ExcelReader.cs b/ENI2/Excel/ExcelReader.cs index c146555c..ed3aae2b 100644 --- a/ENI2/Excel/ExcelReader.cs +++ b/ENI2/Excel/ExcelReader.cs @@ -203,21 +203,25 @@ namespace ENI2.Excel } /// - /// read nationality field an returns 2 Char ISO code (optional lookup) and "confirms" - /// the field + /// read nationality field, validation only via log (so none, really..) /// + /// uppercase 2 character flag code if valid, empty string otherwise internal string ReadNationality(string lookup) { - string val = this.ReadText(lookup); + string val = this.ReadText(lookup).Trim().ToUpper(); if ((val != null) && (val.Length == 2)) { string isoCode = LocodeDB.CountryCodeFromName(val); if (isoCode == null) + { _log.ErrorFormat("Wrong ISO code {0}", val); + val = ""; + } } else { + val = ""; _log.ErrorFormat("cannot read nationality {0}", lookup); }