Fixed scanning bug in Nationality lookup
This commit is contained in:
parent
fd34b2b23a
commit
640a0564ab
@ -37,7 +37,7 @@
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>6.9.17.0</ApplicationVersion>
|
||||
<ApplicationVersion>6.9.18.0</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
|
||||
@ -210,21 +210,19 @@ namespace ENI2.Excel
|
||||
{
|
||||
string val = this.ReadText(lookup).Trim().ToUpper();
|
||||
|
||||
if ((val != null) && (val.Length == 2))
|
||||
if (val != null)
|
||||
{
|
||||
string isoCode = LocodeDB.CountryCodeFromName(val);
|
||||
if (isoCode == null)
|
||||
if (val.Length > 2)
|
||||
{
|
||||
_log.ErrorFormat("Wrong ISO code {0}", val);
|
||||
val = "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
val = "";
|
||||
_log.ErrorFormat("cannot read nationality {0}", lookup);
|
||||
// maybe it was entered as name and we can get nationality locode from there..
|
||||
string isoCode = LocodeDB.CountryCodeFromName(val);
|
||||
if (isoCode == null)
|
||||
{
|
||||
_log.ErrorFormat("Wrong ISO code {0}", val);
|
||||
val = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
@ -981,7 +981,7 @@ namespace ENI2.Excel
|
||||
}
|
||||
}
|
||||
|
||||
string lastPort = reader.ReadText("NOA_NOD.LastPort")?.Trim();
|
||||
string lastPort = reader.ReadText("NOA_NOD.LastPort")?.Trim().ToUpper();
|
||||
|
||||
if (lastPort != null)
|
||||
{
|
||||
@ -999,7 +999,7 @@ namespace ENI2.Excel
|
||||
}
|
||||
}
|
||||
|
||||
string nextPort = reader.ReadText("NOA_NOD.NextPort")?.Trim();
|
||||
string nextPort = reader.ReadText("NOA_NOD.NextPort")?.Trim().ToUpper();
|
||||
if (!nextPort.IsNullOrEmpty() && (nextPort.Length > 5))
|
||||
nextPort = nextPort.Substring(0, 5); //trunc
|
||||
|
||||
@ -1643,7 +1643,7 @@ namespace ENI2.Excel
|
||||
|
||||
towa.TowageOnArrivalName = towageName;
|
||||
|
||||
towa.TowageOnArrivalFlag = reader.ReadText(tFlag);
|
||||
towa.TowageOnArrivalFlag = reader.ReadNationality(tFlag);
|
||||
towa.TowageOnArrivalPurposeOfCall = reader.ReadText(tPoC);
|
||||
towa.TowageOnArrivalDraught_DMT = reader.ReadNumber(tDraft);
|
||||
towa.TowageOnArrivalGrossTonnage = (int?) reader.ReadNumber(tGT);
|
||||
@ -1697,8 +1697,8 @@ namespace ENI2.Excel
|
||||
towdMessage.Elements.Add(towd);
|
||||
}
|
||||
|
||||
towd.TowageOnDepartureName = towageName;
|
||||
towd.TowageOnDepartureFlag = reader.ReadText(tFlag);
|
||||
towd.TowageOnDepartureName = towageName;
|
||||
towd.TowageOnDepartureFlag = reader.ReadNationality(tFlag);
|
||||
towd.TowageOnDepartureDraught_DMT = reader.ReadNumber(tDraft);
|
||||
towd.TowageOnDepartureLengthOverall_MTR = reader.ReadNumber(tLen);
|
||||
towd.TowageOnDepartureBeam_MTR = reader.ReadNumber(tBeam);
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("schick Informatik")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("6.9.17")]
|
||||
[assembly: AssemblyInformationalVersion("6.9.18")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2022 schick Informatik")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("6.9.17.*")]
|
||||
[assembly: AssemblyVersion("6.9.18.*")]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user