MS .Net Update
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
<AssemblyName>DD_WMResulthandler</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -43,11 +44,15 @@
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DigitalData.Modules.Logging">
|
||||
<HintPath>..\..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
<Reference Include="DigitalData.Modules.Base">
|
||||
<HintPath>..\..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Independentsoft.Email">
|
||||
<HintPath>P:\Projekte DIGITAL DATA\DIGITAL DATA - Entwicklung\DLL_Bibliotheken\Email .NET\Bin\Independentsoft.Email.dll</HintPath>
|
||||
<Reference Include="DigitalData.Modules.Logging, Version=2.5.4.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Messaging">
|
||||
<HintPath>..\..\..\DDModules\Messaging\bin\Debug\DigitalData.Modules.Messaging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.WINDREAMLib">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WINDREAMLib.dll</HintPath>
|
||||
@@ -69,8 +74,8 @@
|
||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.7.15\lib\net45\NLog.dll</HintPath>
|
||||
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Oracle.ManagedDataAccess">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>
|
||||
@@ -103,7 +108,6 @@
|
||||
<Compile Include="clsCURRENT.vb" />
|
||||
<Compile Include="clsDatabase.vb" />
|
||||
<Compile Include="clsDateiverarbeitung.vb" />
|
||||
<Compile Include="clsEmail.vb" />
|
||||
<Compile Include="clsEncryption.vb" />
|
||||
<Compile Include="clsFileWork.vb" />
|
||||
<Compile Include="clsJob_Work.vb" />
|
||||
@@ -115,6 +119,7 @@
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
Public CURRENToWMConnect As Object
|
||||
Public CURRENToWMSession As Object
|
||||
Public CURRENT_WMDriveLetter As String = "W"
|
||||
Public CURRENT_TempFiles As List(Of String)
|
||||
|
||||
End Module
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.0.0")>
|
||||
<Assembly: AssemblyFileVersion("2.7.0.0")>
|
||||
<Assembly: AssemblyVersion("2.9.0.0")>
|
||||
<Assembly: AssemblyFileVersion("2.9.0.0")>
|
||||
|
||||
@@ -22,7 +22,7 @@ Namespace My.Resources
|
||||
'''<summary>
|
||||
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0"), _
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
|
||||
@@ -15,7 +15,7 @@ Option Explicit On
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
|
||||
|
||||
@@ -4,6 +4,7 @@ Imports System.Text
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports WINDREAMLib
|
||||
|
||||
Public Class clsDateiverarbeitung
|
||||
@@ -211,7 +212,7 @@ Public Class clsDateiverarbeitung
|
||||
Try
|
||||
Const WMObjectEditModeLifeCycleEdit = "&H00000080"
|
||||
Const WMLifeCycleTypeArchivePeriod = 2
|
||||
|
||||
Logger.Debug($"ArchiveDate for WMFile shall be changed: pFromDate [{pFromDate}] pDateOperator [{pDateOperator}]...")
|
||||
pWMObject.LockFor(WMObjectEditModeLifeCycleEdit)
|
||||
Dim oLC = pWMObject.aWMLifeCycle()
|
||||
|
||||
@@ -236,6 +237,7 @@ Public Class clsDateiverarbeitung
|
||||
Return False
|
||||
End Select
|
||||
Dim archBis = DateAdd(oDateIntervall, pIntervall, oDateFrom)
|
||||
Logger.Debug($"...archBis is [{archBis.ToShortDateString}]!")
|
||||
'Dim pArchiveDate As String = archBis.ToString("yyyy-MM-dd")
|
||||
oLC.SetPeriodEndDate(WMLifeCycleTypeArchivePeriod, archBis)
|
||||
|
||||
@@ -699,6 +701,18 @@ Public Class clsDateiverarbeitung
|
||||
wdIndexwert = wdIndexwert.ToString.TrimEnd
|
||||
wdIndexwert = wdIndexwert.ToString.TrimStart
|
||||
Logger.Debug("indexvalue read is: '" & wdIndexwert & "'")
|
||||
Try
|
||||
Dim oConvertDT As DateTime
|
||||
If DateTime.TryParse(wdIndexwert, oConvertDT) Then
|
||||
Logger.Debug("indexvalue is datetime - converting to date")
|
||||
Dim myDate As Date = wdIndexwert
|
||||
wdIndexwert = Format(myDate, "yyyy-MM-dd")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Warn("clsDateiverarbeitung: Error checking datetime: " & ex.Message)
|
||||
End Try
|
||||
|
||||
|
||||
_STRING = _STRING.Replace(reg_element.Value, wdIndexwert.ToString)
|
||||
Logger.Debug("REGEX_String (" & i & ") " & _STRING)
|
||||
i += 1
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
|
||||
Imports System
|
||||
Imports Independentsoft.Email
|
||||
Imports Independentsoft.Email.Smtp
|
||||
Imports Independentsoft.Email.Mime
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports System.Net.Mail
|
||||
Imports System.Net
|
||||
Imports System.Net.Mime
|
||||
|
||||
Public Class clsEmail
|
||||
Dim Logger As DigitalData.Modules.Logging.Logger
|
||||
Private Shared MailAktiv As Boolean = False
|
||||
Sub New(MyLogger As LogConfig)
|
||||
Logger = MyLogger.GetLogger()
|
||||
End Sub
|
||||
Public Function Email_Send(ByVal pMailSubject As String, ByVal pMailBody As String, pMailto As String,
|
||||
pMailfrom As String, pMailSmtp As String, pMailport As Integer, pMailUser As String, pMailPW As String,
|
||||
pAUTH_TYPE As String, Optional pAttment As String = "", Optional pTest As Boolean = False)
|
||||
Try
|
||||
Dim oError As Boolean = False
|
||||
Dim oReceipiants As String()
|
||||
If pMailto.Contains(";") Then
|
||||
oReceipiants = pMailto.Split(";")
|
||||
Else
|
||||
ReDim Preserve oReceipiants(0)
|
||||
oReceipiants(0) = pMailto
|
||||
End If
|
||||
For Each oMailReceipiant As String In oReceipiants
|
||||
Dim sClient = New Net.Mail.SmtpClient(pMailSmtp)
|
||||
Dim mymesssage As New MailMessage
|
||||
sClient.Port = pMailport
|
||||
If pAUTH_TYPE = "SSL" Then
|
||||
sClient.EnableSsl = True
|
||||
Else
|
||||
sClient.EnableSsl = False
|
||||
End If
|
||||
|
||||
sClient.Credentials = New NetworkCredential(pMailUser, pMailPW)
|
||||
sClient.UseDefaultCredentials = False
|
||||
If pTest = True Then
|
||||
mymesssage.Body = $"This is the body (text will be replaced within profile)! <br> mailsmtp: {pMailSmtp} <br> mailport: {pMailport} <br> mailUser: {pMailUser} <br> mailPW: XXXX <br> AUTH_TYPE: {pAUTH_TYPE}"
|
||||
Else
|
||||
mymesssage.Body = pMailBody
|
||||
End If
|
||||
|
||||
'mymesssage.IsBodyHtml = True
|
||||
Dim htmlView As AlternateView = AlternateView.CreateAlternateViewFromString(mymesssage.Body)
|
||||
htmlView.ContentType = New System.Net.Mime.ContentType("text/html")
|
||||
mymesssage.AlternateViews.Add(htmlView)
|
||||
pAttment = pAttment.Replace("W:\", "\\windream\objects\")
|
||||
If pAttment <> String.Empty Then
|
||||
If System.IO.File.Exists(pAttment) Then
|
||||
Logger.Debug($"working on attachment {pAttment.ToString}...")
|
||||
Dim oAttachment As New System.Net.Mail.Attachment(pAttment)
|
||||
mymesssage.Attachments.Add(oAttachment)
|
||||
Else
|
||||
Logger.Warn($"Attachment {pAttment.ToString} is not existing - Mail won't be send!")
|
||||
oError = True
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
mymesssage.From = New MailAddress(pMailfrom)
|
||||
mymesssage.Subject = pMailSubject
|
||||
mymesssage.To.Add(New MailAddress(oMailReceipiant))
|
||||
sClient.Send(mymesssage)
|
||||
Logger.Info($"Email successfully send to: [{oMailReceipiant}]!")
|
||||
Logger.Debug($"Email successfully send to: [{oMailReceipiant}]!")
|
||||
Next
|
||||
If oError = False Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
End Class
|
||||
@@ -1,9 +1,11 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Messaging
|
||||
|
||||
Public Class clsJob_Work
|
||||
Dim Logger As Logger
|
||||
Private MyLogger As LogConfig
|
||||
Private _mail As clsEmail
|
||||
Public Sub New(MyLoggerConf As LogConfig, _email As clsEmail)
|
||||
Private _mail As MailSender
|
||||
Public Sub New(MyLoggerConf As LogConfig, _email As MailSender)
|
||||
Logger = MyLoggerConf.GetLogger()
|
||||
MyLogger = MyLoggerConf
|
||||
_mail = _email
|
||||
@@ -44,11 +46,25 @@ Public Class clsJob_Work
|
||||
Logger.Warn("PWPlain is Nothing - Could not decrypt passwort 44")
|
||||
Return False
|
||||
End If
|
||||
If _mail.Email_Send(Email_subject, Email_Body, Email_receipiants, oMAILFROM, oMAILSMTP, oMAIL_PORT, oMAIL_USER, oMAIL_USER_PW, oMAIL_AUTH_TYPE, Attachment_Filename) = True Then
|
||||
Return True
|
||||
Else
|
||||
Logger.Warn("Email_Send_Independentsoft was not successfull!")
|
||||
Return False
|
||||
Dim oSendto As New List(Of String)
|
||||
Dim oSplit = Email_receipiants.Split(";")
|
||||
For Each oMailAdress In oSplit
|
||||
oSendto.Add(oMailAdress)
|
||||
Next
|
||||
|
||||
Dim oAttMt As New List(Of String)
|
||||
If Attachment_Filename <> String.Empty Then
|
||||
oAttMt.Add(Attachment_Filename)
|
||||
End If
|
||||
If _mail.ConnectToServer(oMAILSMTP, oMAIL_PORT, oMAIL_USER, oPWPlain, oMAIL_AUTH_TYPE) = True Then
|
||||
Logger.Info($"MAIL: Connection to {oMAILSMTP} successfull!")
|
||||
If _mail.SendMail(oSendto, oMAILFROM, Email_subject, Email_Body, Now, oAttMt, 0) = True Then
|
||||
Return True
|
||||
|
||||
Else
|
||||
Logger.Warn("ConnectToServer was not successfull!")
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
|
||||
@@ -3,6 +3,7 @@ Imports System.IO
|
||||
Imports System.Text
|
||||
Imports Newtonsoft.Json
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Messaging
|
||||
|
||||
Public Class clsProfil
|
||||
Inherits clsCURRENT
|
||||
@@ -14,7 +15,7 @@ Public Class clsProfil
|
||||
Private _database As clsDatabase
|
||||
Private _dateiverarbeitung As clsDateiverarbeitung
|
||||
Private _JobWork As clsJob_Work
|
||||
Private _email As clsEmail
|
||||
Private _email As MailSender
|
||||
Private Shared WD_aktivesDokument As WMObject
|
||||
#End Region
|
||||
Sub New(MyLogger As LogConfig, PROFIL_ID As Integer)
|
||||
@@ -23,7 +24,7 @@ Public Class clsProfil
|
||||
windream_index = New clsWindream_Index(MyLogger)
|
||||
_database = New clsDatabase(MyLogger)
|
||||
_dateiverarbeitung = New clsDateiverarbeitung(MyLogger)
|
||||
_email = New clsEmail(MyLogger)
|
||||
_email = New MailSender(MyLogger)
|
||||
_JobWork = New clsJob_Work(MyLogger, _email)
|
||||
|
||||
End Sub
|
||||
@@ -167,6 +168,7 @@ Public Class clsProfil
|
||||
oGesamtFiles = windreamSucheErgebnisse.Count
|
||||
Dim oCountDocs As Integer = 0
|
||||
Dim oEmailAttachment_path As String
|
||||
|
||||
For Each WMdok As WMObject In windreamSucheErgebnisse
|
||||
|
||||
oEmailAttachment_path = String.Empty
|
||||
@@ -256,14 +258,39 @@ Public Class clsProfil
|
||||
If oAttachment_FullFilename <> String.Empty Then
|
||||
Logger.Warn($"Email Attachment {oAttachment_FullFilename}")
|
||||
End If
|
||||
If _email.Email_Send(oEmail_Betreff, Email_Body, Email_Empfänger, MAILFROM, MAILSMTP, MAIL_PORT, MAIL_USER, MAIL_USER_PW, MAIL_AUTH_TYPE, oAttachment_FullFilename) = True Then
|
||||
Dim oSendto As New List(Of String)
|
||||
Dim oSplit = Email_Empfänger.split(";")
|
||||
For Each oMailAdress In oSplit
|
||||
oSendto.Add(oMailAdress)
|
||||
Next
|
||||
|
||||
Dim oAttMt As New List(Of String)
|
||||
If oAttachment_FullFilename <> String.Empty Then
|
||||
oAttMt.Add(oAttachment_FullFilename)
|
||||
clsCURRENT.TEMP_FILES.Add(oAttachment_FullFilename)
|
||||
End If
|
||||
If Not IsNothing(_email) And _email.Connected2Server = False Then
|
||||
If _email.ConnectToServer(MAILSMTP, MAIL_PORT, MAIL_USER, MAIL_USER_PW, MAIL_AUTH_TYPE) = True Then
|
||||
Logger.Info($"MAIL: Connection to {MAILSMTP} successfull!")
|
||||
Else
|
||||
Logger.Warn($"{oFileRunNo} Email_ConnectToServer was not successfull!")
|
||||
FileJobSuccessful = False
|
||||
End If
|
||||
|
||||
End If
|
||||
If Not IsNothing(_email) And _email.SendMail(oSendto, MAILFROM, oEmail_Betreff, Email_Body, Now, oAttMt, 0) = True Then
|
||||
FileJobSuccessful = True
|
||||
Else
|
||||
|
||||
Logger.Warn($"{oFileRunNo} Email_Send_Independentsoft 1 was not successfull!")
|
||||
FileJobSuccessful = False
|
||||
If IsNothing(_email) Then
|
||||
Logger.Info($"_email is nothing")
|
||||
Else
|
||||
Logger.Info($"{oFileRunNo} Email_SendMail was not successfull!")
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
Logger.Warn($"{oFileRunNo} DT_TBDD_EMAIL is nothing or contains no rows")
|
||||
Return False
|
||||
@@ -312,6 +339,8 @@ Public Class clsProfil
|
||||
|
||||
End Select
|
||||
Next
|
||||
|
||||
|
||||
'##################################
|
||||
'JETZT DER DURCHLAUF DER DATEI-JOBS
|
||||
'##################################
|
||||
@@ -446,8 +475,18 @@ Public Class clsProfil
|
||||
Else
|
||||
Logger.Warn("KEINE File-JOBS für Profil '" & _Profilname & "' angelegt!")
|
||||
End If
|
||||
Next
|
||||
|
||||
Next
|
||||
Try
|
||||
If Not IsNothing(_email) Then
|
||||
If _email.Connected2Server = True Then
|
||||
_email.DisconnectFromServer()
|
||||
End If
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
'Jetzt nochmal ein Durchlauf für Profiljobs wo alle Dateien abgearbeitet wurden.
|
||||
For Each DR_PR_JB As DataRow In DT_PROFIL_JOB.Rows
|
||||
Logger.Info("New run for " & DR_PR_JB.Item("JOB_TYP").ToString.ToUpper)
|
||||
@@ -594,14 +633,30 @@ Public Class clsProfil
|
||||
|
||||
Return False
|
||||
End If
|
||||
Dim oSendto As New List(Of String)
|
||||
Dim oSplit = Email_Empfänger.split(";")
|
||||
For Each oMailAdress In oSplit
|
||||
oSendto.Add(oMailAdress)
|
||||
Next
|
||||
|
||||
If _email.Email_Send(Email_Betreff, Email_Body, Email_Empfänger, MAILFROM, MAILSMTP, MAIL_PORT, MAIL_USER, MAIL_USER_PW, MAIL_AUTH_TYPE, clsCURRENT.CONCATTED_FILE) = True Then
|
||||
FileJobSuccessful = True
|
||||
Else
|
||||
Logger.Warn("Email_Send_Independentsoft 2 was not successfull!")
|
||||
FileJobSuccessful = False
|
||||
Dim oAttMt As New List(Of String)
|
||||
If clsCURRENT.CONCATTED_FILE <> String.Empty Then
|
||||
oAttMt.Add(clsCURRENT.CONCATTED_FILE)
|
||||
clsCURRENT.TEMP_FILES.Add(clsCURRENT.CONCATTED_FILE)
|
||||
End If
|
||||
|
||||
If _email.ConnectToServer(MAILSMTP, MAIL_PORT, MAIL_USER, MAIL_USER_PW, MAIL_AUTH_TYPE) = True Then
|
||||
If _email.SendMail(oSendto, MAILFROM, Email_Betreff, Email_Body, Now, oAttMt, 0) = True Then
|
||||
FileJobSuccessful = True
|
||||
Else
|
||||
Logger.Warn("Email_SendMail2 was not successfull!")
|
||||
FileJobSuccessful = False
|
||||
End If
|
||||
_email.DisconnectFromServer()
|
||||
Else
|
||||
Logger.Warn($"Email_ConnectToServer2 was not successfull!")
|
||||
FileJobSuccessful = False
|
||||
End If
|
||||
|
||||
Else
|
||||
Logger.Warn("DT_TBDD_EMAIL is nothing or contains no rows")
|
||||
@@ -619,10 +674,12 @@ Public Class clsProfil
|
||||
Try
|
||||
Dim myproc As Process = New Process()
|
||||
myproc.StartInfo.FileName = """" & oFileString & """"
|
||||
myproc.StartInfo.Verb = "printto"
|
||||
myproc.StartInfo.Verb = "printto" '"printto"
|
||||
myproc.StartInfo.Arguments = oPrintername
|
||||
myproc.StartInfo.UseShellExecute = True
|
||||
Logger.Debug($"Send2Printer [{ myproc.StartInfo.FileName} # Verb:{myproc.StartInfo.Verb} # Arguments: {myproc.StartInfo.Arguments}] ")
|
||||
myproc.Start()
|
||||
System.Threading.Thread.Sleep(500)
|
||||
Dim p As Process
|
||||
p = Process.GetProcessById(myproc.Id)
|
||||
Dim sw As Stopwatch = New Stopwatch()
|
||||
@@ -636,15 +693,24 @@ Public Class clsProfil
|
||||
End If
|
||||
Loop
|
||||
Logger.Debug("...process has exited: ")
|
||||
Logger.Info($"Send2Printer [{ myproc.StartInfo.FileName} # Verb:{myproc.StartInfo.Verb} # Arguments: {myproc.StartInfo.Arguments}]successfull! ")
|
||||
FileJobSuccessful = True
|
||||
sw.Stop()
|
||||
' myproc.Kill()
|
||||
Logger.Info($"Send2Printer successfully [{ myproc.StartInfo.FileName} # Verb:{myproc.StartInfo.Verb} # Arguments: {myproc.StartInfo.Arguments}] ")
|
||||
|
||||
File.Delete(oFileString)
|
||||
Logger.Debug($"Deleted oFileString [{oFileString}]!")
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Could not print (printto) file: " & oFileString)
|
||||
Logger.Error(ex)
|
||||
Dim omsg = "ERROR: Could not print (printto) file: " & oFileString
|
||||
omsg &= vbNewLine & ex.Message
|
||||
Logger.Info(omsg)
|
||||
Logger.Error(ex, omsg)
|
||||
FileJobSuccessful = False
|
||||
Try
|
||||
File.Delete(oFileString)
|
||||
Catch ex1 As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End Try
|
||||
Next
|
||||
Case "Send InfoMail with WM-Search".ToUpper
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
<package id="NLog" version="4.7.15" targetFramework="net461" />
|
||||
<package id="NLog" version="5.0.5" targetFramework="net462" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user