diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx index 552f3e3b..47e49252 100644 Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ diff --git a/nsw/Source/bsmd.ExcelReadService/ExcelReader.cs b/nsw/Source/bsmd.ExcelReadService/ExcelReader.cs index 0a28dc3b..762f6b37 100644 --- a/nsw/Source/bsmd.ExcelReadService/ExcelReader.cs +++ b/nsw/Source/bsmd.ExcelReadService/ExcelReader.cs @@ -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); diff --git a/nsw/Source/bsmd.ExcelReadService/Util.cs b/nsw/Source/bsmd.ExcelReadService/Util.cs index 5c653d6d..b6b99386 100644 --- a/nsw/Source/bsmd.ExcelReadService/Util.cs +++ b/nsw/Source/bsmd.ExcelReadService/Util.cs @@ -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); diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs index feb39704..d7ce7fad 100644 --- a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs +++ b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs @@ -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("")] \ No newline at end of file diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs index 101f6a08..79f79c06 100644 --- a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs +++ b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs @@ -1,4 +1,4 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.9.*")] +[assembly: AssemblyVersion("3.2.10.*")] diff --git a/nsw/Source/bsmd.database/STAT.cs b/nsw/Source/bsmd.database/STAT.cs index 292f517e..34a7db89 100644 --- a/nsw/Source/bsmd.database/STAT.cs +++ b/nsw/Source/bsmd.database/STAT.cs @@ -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; }