diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj index 5868211b..e4eb42e8 100644 --- a/ENI2/ENI2.csproj +++ b/ENI2/ENI2.csproj @@ -36,7 +36,7 @@ 5.4.0.0 true publish.html - 9 + 10 7.5.0.%2a false true diff --git a/ENI2/Excel/ExcelUtil.cs b/ENI2/Excel/ExcelUtil.cs index fdd74c3c..3dfc136e 100644 --- a/ENI2/Excel/ExcelUtil.cs +++ b/ENI2/Excel/ExcelUtil.cs @@ -2486,37 +2486,40 @@ namespace ENI2.Excel { byte? result = DakosyUtil.ParseDocumentType(documentType); canceled = false; - - if (!documentType.IsNullOrEmpty() && !result.HasValue) + + if (!result.HasValue) { - // special treatment / callback - if (_documentTypeImportDict.ContainsKey(documentType)) + if (documentType.IsNullOrEmpty()) { - result = byte.Parse(_documentTypeImportDict[documentType]); // we have mapped this before + result = 5; // OTHER_LEGAL_IDENTITY_DOCUMENT (CH, 17.10.22) } else { - FixImportDialog fid = new FixImportDialog(); - fid.Value = documentType; - fid.ValueType = "Document type"; - fid.SelectionValues = Util.GlobalStructures.IDDocTypeDict; - if (fid.ShowDialog() ?? false) + // special treatment / callback + if (_documentTypeImportDict.ContainsKey(documentType)) { - if (!fid.SelectedValue.IsNullOrEmpty()) - { - _genderImportDict[documentType] = fid.SelectedValue; - result = byte.Parse(_genderImportDict[documentType]); - } - } + result = byte.Parse(_documentTypeImportDict[documentType]); // we have mapped this before + } else { - canceled = true; + FixImportDialog fid = new FixImportDialog(); + fid.Value = documentType; + fid.ValueType = "Document type"; + fid.SelectionValues = Util.GlobalStructures.IDDocTypeDict; + if (fid.ShowDialog() ?? false) + { + if (!fid.SelectedValue.IsNullOrEmpty()) + { + _genderImportDict[documentType] = fid.SelectedValue; + result = byte.Parse(_genderImportDict[documentType]); + } + } + else + { + canceled = true; + } } } - } - else - { - result = 5; // OTHER_LEGAL_IDENTITY_DOCUMENT (CH, 17.10.22) } return result;