fixed document import and new test version

This commit is contained in:
Daniel Schick 2022-10-21 08:25:24 +02:00
parent bb5de64cab
commit f593d66333
2 changed files with 25 additions and 22 deletions

View File

@ -36,7 +36,7 @@
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion> <MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage> <WebPage>publish.html</WebPage>
<ApplicationRevision>9</ApplicationRevision> <ApplicationRevision>10</ApplicationRevision>
<ApplicationVersion>7.5.0.%2a</ApplicationVersion> <ApplicationVersion>7.5.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>

View File

@ -2486,37 +2486,40 @@ namespace ENI2.Excel
{ {
byte? result = DakosyUtil.ParseDocumentType(documentType); byte? result = DakosyUtil.ParseDocumentType(documentType);
canceled = false; canceled = false;
if (!documentType.IsNullOrEmpty() && !result.HasValue) if (!result.HasValue)
{ {
// special treatment / callback if (documentType.IsNullOrEmpty())
if (_documentTypeImportDict.ContainsKey(documentType))
{ {
result = byte.Parse(_documentTypeImportDict[documentType]); // we have mapped this before result = 5; // OTHER_LEGAL_IDENTITY_DOCUMENT (CH, 17.10.22)
} }
else else
{ {
FixImportDialog fid = new FixImportDialog(); // special treatment / callback
fid.Value = documentType; if (_documentTypeImportDict.ContainsKey(documentType))
fid.ValueType = "Document type";
fid.SelectionValues = Util.GlobalStructures.IDDocTypeDict;
if (fid.ShowDialog() ?? false)
{ {
if (!fid.SelectedValue.IsNullOrEmpty()) result = byte.Parse(_documentTypeImportDict[documentType]); // we have mapped this before
{ }
_genderImportDict[documentType] = fid.SelectedValue;
result = byte.Parse(_genderImportDict[documentType]);
}
}
else 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; return result;