Version 3.2.1, Korrektur Excel

This commit is contained in:
Daniel Schick 2016-09-11 07:59:42 +00:00
parent 4f117a1ae7
commit 7e69ecd37c
8 changed files with 42 additions and 8 deletions

Binary file not shown.

View File

@ -149,7 +149,10 @@ namespace bsmd.ExcelReadService
}
if (receiptText.Length > 0)
BSMDMail.SendSystemInfoAsync(receiptSubject, receiptText, null);
{
_log.Debug("sending system info email");
BSMDMail.SendSystemInfo(receiptSubject, receiptText, mailSender);
}
// remove e-Mail

View File

@ -15,6 +15,7 @@ using System.Data;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Runtime.InteropServices;
namespace bsmd.ExcelReadService
{
@ -261,10 +262,23 @@ namespace bsmd.ExcelReadService
public void Dispose()
{
if(this._portcall != null)
{
_log.Debug("close Worksheet");
Marshal.ReleaseComObject(this._portcall);
}
if (this._excelWorkbooks != null)
this._excelWorkbooks.Close();
{
_log.Debug("Close Workbooks");
Marshal.ReleaseComObject(this._excelWorkbooks);
// this._excelWorkbooks.Close();
}
if (this._excelApp != null)
{
_log.Debug("Quit Excel");
this._excelApp.Quit();
}
}
internal DateTime? ReadDate(string lookup)

View File

@ -1022,11 +1022,15 @@ namespace bsmd.ExcelReadService
return null;
}
// neuen MessageCore erzeugen
result = new MessageCore();
result.Incoming = true;
result.HerbergFormGuid = Guid.Empty;
result.IMO = imo;
result.IsTransit = isTransit;
result.ReportStatus = MessageCore.ReportStatusEnum.COMPLETE;
result.BSMDStatusInternal = MessageCore.BSMDStatus.PREPARE;
result.Portname = poc;
result.ETA = eta;
if (result.IMO.Length > 7)

View File

@ -13,4 +13,7 @@ Das erste liefert einen 5.7.1 zur
Das zweite ist nur Pop aktiviert….
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

View File

@ -2,6 +2,6 @@
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
[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: AssemblyTrademark("")]

View File

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

View File

@ -141,8 +141,18 @@ namespace bsmd.email
message.To.Add(recipient);
MailAddress adminAddress = new MailAddress(Properties.Settings.Default.AdminEmail);
message.CC.Add(adminAddress);
mailer.Send(message);
try
{
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);
}
}
}