Version 3.2.8: Korrekturen und das Excel schließt immer noch nicht richtig
This commit is contained in:
parent
84758e585e
commit
376c9492dc
Binary file not shown.
@ -99,6 +99,7 @@ namespace bsmd.ExcelReadService
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Marshal.ReleaseComObject(range);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal string ReadText(string lookup)
|
internal string ReadText(string lookup)
|
||||||
@ -264,12 +265,14 @@ namespace bsmd.ExcelReadService
|
|||||||
{
|
{
|
||||||
if(this._portcall != null)
|
if(this._portcall != null)
|
||||||
{
|
{
|
||||||
_log.Debug("close Worksheet");
|
this._portcall.Close(0);
|
||||||
|
_log.Debug("Close Worksheet");
|
||||||
Marshal.ReleaseComObject(this._portcall);
|
Marshal.ReleaseComObject(this._portcall);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._excelWorkbooks != null)
|
if (this._excelWorkbooks != null)
|
||||||
{
|
{
|
||||||
|
this._excelWorkbooks.Close();
|
||||||
_log.Debug("Close Workbooks");
|
_log.Debug("Close Workbooks");
|
||||||
Marshal.ReleaseComObject(this._excelWorkbooks);
|
Marshal.ReleaseComObject(this._excelWorkbooks);
|
||||||
// this._excelWorkbooks.Close();
|
// this._excelWorkbooks.Close();
|
||||||
@ -278,6 +281,7 @@ namespace bsmd.ExcelReadService
|
|||||||
{
|
{
|
||||||
_log.Debug("Quit Excel");
|
_log.Debug("Quit Excel");
|
||||||
this._excelApp.Quit();
|
this._excelApp.Quit();
|
||||||
|
Marshal.ReleaseComObject(this._excelApp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -432,11 +436,12 @@ namespace bsmd.ExcelReadService
|
|||||||
if (val is string)
|
if (val is string)
|
||||||
{
|
{
|
||||||
double tmpDouble;
|
double tmpDouble;
|
||||||
if (double.TryParse(val, NumberStyles.None, CultureInfo.InvariantCulture, out tmpDouble))
|
if (double.TryParse(val, NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite,
|
||||||
|
CultureInfo.InvariantCulture, out tmpDouble))
|
||||||
result = tmpDouble;
|
result = tmpDouble;
|
||||||
if (result == null)
|
if (result == null)
|
||||||
{
|
{
|
||||||
if (double.TryParse(val, out tmpDouble))
|
if (double.TryParse(val, out tmpDouble)) // current language style (==GER, mit , statt .)
|
||||||
result = tmpDouble;
|
result = tmpDouble;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -399,7 +399,12 @@ namespace bsmd.ExcelReadService
|
|||||||
if (nextPorts.Count == 1)
|
if (nextPorts.Count == 1)
|
||||||
noa_nod.NextPort = nextPorts[0];
|
noa_nod.NextPort = nextPorts[0];
|
||||||
else
|
else
|
||||||
_log.WarnFormat("{0} results in {1} possible LOCODES", nextPort, nextPorts.Count);
|
{
|
||||||
|
if (nextPort.Equals("ZZUKN", StringComparison.OrdinalIgnoreCase))
|
||||||
|
noa_nod.NextPort = nextPort;
|
||||||
|
else
|
||||||
|
_log.WarnFormat("{0} results in {1} possible LOCODES", nextPort, nextPorts.Count);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
noa_nod.ETDFromPortOfCall = reader.ReadDateTime("NOA_NOD.ETDDateFromPortOfCall", "NOA_NOD.ETDTimeFromPortOfCall");
|
noa_nod.ETDFromPortOfCall = reader.ReadDateTime("NOA_NOD.ETDDateFromPortOfCall", "NOA_NOD.ETDTimeFromPortOfCall");
|
||||||
@ -453,8 +458,13 @@ namespace bsmd.ExcelReadService
|
|||||||
string wastedispServProvName = reader.ReadText("WAS.WasteDisposalServiceProviderName");
|
string wastedispServProvName = reader.ReadText("WAS.WasteDisposalServiceProviderName");
|
||||||
if (wastedispServProvName != null)
|
if (wastedispServProvName != null)
|
||||||
{
|
{
|
||||||
if(was.WasteDisposalServiceProvider.Count == 0)
|
if (was.WasteDisposalServiceProvider.Count == 0)
|
||||||
was.WasteDisposalServiceProvider.Add(new WasteDisposalServiceProvider());
|
{
|
||||||
|
WasteDisposalServiceProvider wdsp = new WasteDisposalServiceProvider();
|
||||||
|
wdsp.Identifier = "1";
|
||||||
|
wdsp.WAS = was;
|
||||||
|
was.WasteDisposalServiceProvider.Add(wdsp);
|
||||||
|
}
|
||||||
was.WasteDisposalServiceProvider[0].WasteDisposalServiceProviderName = wastedispServProvName;
|
was.WasteDisposalServiceProvider[0].WasteDisposalServiceProviderName = wastedispServProvName;
|
||||||
was.WasteDisposalServiceProvider[0].WasteDisposalDelivery = was.WasteDisposalDelivery;
|
was.WasteDisposalServiceProvider[0].WasteDisposalDelivery = was.WasteDisposalDelivery;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
||||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||||
[assembly: AssemblyInformationalVersion("3.2.7")]
|
[assembly: AssemblyInformationalVersion("3.2.8")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2014-2016 Informatikbüro Daniel Schick. All rights reserved.")]
|
[assembly: AssemblyCopyright("Copyright © 2014-2016 Informatikbüro Daniel Schick. All rights reserved.")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("3.2.7.*")]
|
[assembly: AssemblyVersion("3.2.8.*")]
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user