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