Version 3.2.10, neue Korreturen

This commit is contained in:
Daniel Schick 2016-10-10 13:28:26 +00:00
parent ab8fff1d5e
commit 2a54e905e6
6 changed files with 22 additions and 6 deletions

Binary file not shown.

View File

@ -405,6 +405,16 @@ namespace bsmd.ExcelReadService
return date;
}
if (result == null)
{
CultureInfo provider = CultureInfo.InvariantCulture;
string dateString = val.ToString();
string format = "HHmm";
DateTime tmpDate;
if (DateTime.TryParseExact(dateString, format, provider, DateTimeStyles.None, out tmpDate))
result = tmpDate;
}
if (result != null)
{
this.HighlightLookup(lookup, ReadState.OK);

View File

@ -311,6 +311,8 @@ namespace bsmd.ExcelReadService
}
STAT stat = statMessage.Elements[0] as STAT;
Util.ScanMessage(stat, reader);
stat.MMSINumber = reader.ReadTextNoWhitespace("STAT.MMSINumber");
stat.ISMCompanyId = reader.ReadTextNoWhitespace("STAT.ISMCompanyId");
if (!stat.Flag.IsNullOrEmpty() && stat.Flag.Length > 2)
stat.Flag = LocodeDB.CountryCodeFromName(stat.Flag);
@ -637,6 +639,10 @@ namespace bsmd.ExcelReadService
string portDateOfDeparture = string.Format("SEC.PortFacilityDateOfDeparture_{0}", i);
string portShipSecLevel = string.Format("SEC.PortFacilityShipSecurityLevel_{0}", i);
string portGISISCode = string.Format("SEC.PortFacilityGISISCode_{0}", i);
if((portGISISCode != null) && (portGISISCode.Length < 4))
{
while (portGISISCode.Length < 4) portGISISCode = "0" + portGISISCode;
}
string portSecMatters = string.Format("SEC.PortFacilitySecurityMattersToReport_{0}", i);
LastTenPortFacilitiesCalled l10fc = sec.GetPortFacilityWithIdentifier(i.ToString()) as LastTenPortFacilitiesCalled;
@ -876,6 +882,8 @@ namespace bsmd.ExcelReadService
}
ladg.CargoCodeNST = reader.ReadText(lnType);
if ((ladg.CargoCodeNST != null) && (ladg.CargoCodeNST.Length == 1))
ladg.CargoCodeNST = "0" + ladg.CargoCodeNST;
if ((ladg.CargoCodeNST != null) && (ladg.CargoCodeNST.Length != 2)) ladg.CargoCodeNST = null; // stupid validation
ladg.CargoNumberOfItems = (int?) reader.ReadNumber(lnCNOI);

View File

@ -2,6 +2,6 @@
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
[assembly: AssemblyProduct("BSMD NSW interface")]
[assembly: AssemblyInformationalVersion("3.2.9")]
[assembly: AssemblyInformationalVersion("3.2.10")]
[assembly: AssemblyCopyright("Copyright © 2014-2016 Informatikbüro Daniel Schick. All rights reserved.")]
[assembly: AssemblyTrademark("")]

View File

@ -1,4 +1,4 @@
using System.Reflection;
[assembly: AssemblyVersion("3.2.9.*")]
[assembly: AssemblyVersion("3.2.10.*")]

View File

@ -37,8 +37,7 @@ namespace bsmd.database
public string CallSign { get; set; }
[ShowReport]
[Validation(ValidationCode.NOT_NULL)]
[LookupName("STAT.MMSINumber")]
[Validation(ValidationCode.NOT_NULL)]
[MaxLength(50)]
public string MMSINumber { get; set; }
@ -107,8 +106,7 @@ namespace bsmd.database
public string ISMCompanyName { get; set; }
[ShowReport]
[Validation(ValidationCode.STRING_EXACT_LEN, 7)]
[LookupName("STAT.ISMCompanyId")]
[Validation(ValidationCode.STRING_EXACT_LEN, 7)]
[MaxLength(10)]
public string ISMCompanyId { get; set; }