Version 3.2.1, Korrektur Excel
This commit is contained in:
parent
4f117a1ae7
commit
7e69ecd37c
Binary file not shown.
@ -149,7 +149,10 @@ namespace bsmd.ExcelReadService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (receiptText.Length > 0)
|
if (receiptText.Length > 0)
|
||||||
BSMDMail.SendSystemInfoAsync(receiptSubject, receiptText, null);
|
{
|
||||||
|
_log.Debug("sending system info email");
|
||||||
|
BSMDMail.SendSystemInfo(receiptSubject, receiptText, mailSender);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// remove e-Mail
|
// remove e-Mail
|
||||||
|
|||||||
@ -15,6 +15,7 @@ using System.Data;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace bsmd.ExcelReadService
|
namespace bsmd.ExcelReadService
|
||||||
{
|
{
|
||||||
@ -261,10 +262,23 @@ namespace bsmd.ExcelReadService
|
|||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
if(this._portcall != null)
|
||||||
|
{
|
||||||
|
_log.Debug("close Worksheet");
|
||||||
|
Marshal.ReleaseComObject(this._portcall);
|
||||||
|
}
|
||||||
|
|
||||||
if (this._excelWorkbooks != null)
|
if (this._excelWorkbooks != null)
|
||||||
this._excelWorkbooks.Close();
|
{
|
||||||
|
_log.Debug("Close Workbooks");
|
||||||
|
Marshal.ReleaseComObject(this._excelWorkbooks);
|
||||||
|
// this._excelWorkbooks.Close();
|
||||||
|
}
|
||||||
if (this._excelApp != null)
|
if (this._excelApp != null)
|
||||||
|
{
|
||||||
|
_log.Debug("Quit Excel");
|
||||||
this._excelApp.Quit();
|
this._excelApp.Quit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal DateTime? ReadDate(string lookup)
|
internal DateTime? ReadDate(string lookup)
|
||||||
|
|||||||
@ -1022,11 +1022,15 @@ namespace bsmd.ExcelReadService
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// neuen MessageCore erzeugen
|
||||||
result = new MessageCore();
|
result = new MessageCore();
|
||||||
|
|
||||||
|
result.Incoming = true;
|
||||||
|
result.HerbergFormGuid = Guid.Empty;
|
||||||
result.IMO = imo;
|
result.IMO = imo;
|
||||||
result.IsTransit = isTransit;
|
result.IsTransit = isTransit;
|
||||||
result.ReportStatus = MessageCore.ReportStatusEnum.COMPLETE;
|
result.ReportStatus = MessageCore.ReportStatusEnum.COMPLETE;
|
||||||
|
result.BSMDStatusInternal = MessageCore.BSMDStatus.PREPARE;
|
||||||
result.Portname = poc;
|
result.Portname = poc;
|
||||||
result.ETA = eta;
|
result.ETA = eta;
|
||||||
if (result.IMO.Length > 7)
|
if (result.IMO.Length > 7)
|
||||||
|
|||||||
@ -13,4 +13,7 @@ Das erste liefert einen 5.7.1 zur
|
|||||||
Das zweite ist nur Pop aktiviert….
|
Das zweite ist nur Pop aktiviert….
|
||||||
|
|
||||||
die Server IP lautet 192.168.2.101
|
die Server IP lautet 192.168.2.101
|
||||||
SMTP Port ist Standard, POP3 ist 995 mit SSL
|
SMTP Port ist Standard, POP3 ist 995 mit SSL
|
||||||
|
|
||||||
|
Unter Windows 2008 Server funktionierte COM Interop zunächst nicht, Lösung hier:
|
||||||
|
http://stackoverflow.com/questions/4408336/system-runtime-interopservices-comexception-0x800a03ec
|
||||||
@ -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.0")]
|
[assembly: AssemblyInformationalVersion("3.2.1")]
|
||||||
[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.0.*")]
|
[assembly: AssemblyVersion("3.2.1.*")]
|
||||||
|
|
||||||
|
|||||||
@ -141,8 +141,18 @@ namespace bsmd.email
|
|||||||
message.To.Add(recipient);
|
message.To.Add(recipient);
|
||||||
MailAddress adminAddress = new MailAddress(Properties.Settings.Default.AdminEmail);
|
MailAddress adminAddress = new MailAddress(Properties.Settings.Default.AdminEmail);
|
||||||
message.CC.Add(adminAddress);
|
message.CC.Add(adminAddress);
|
||||||
|
try
|
||||||
mailer.Send(message);
|
{
|
||||||
|
mailer.Send(message);
|
||||||
|
}
|
||||||
|
catch (SmtpException smtpException)
|
||||||
|
{
|
||||||
|
log.ErrorFormat("SMTP error while sending e-mail:{0}", smtpException.Message);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
log.ErrorFormat("other error while sending e-mail:{0}", ex.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user