Compare commits
15 Commits
820d09da59
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac71f0ce9a | ||
| 7f35fecfa2 | |||
| 45ca73af35 | |||
| 48f9673472 | |||
|
|
a70f006bb1 | ||
|
|
36e2d97b20 | ||
|
|
6add3760bd | ||
|
|
2a76d515cb | ||
|
|
52c3939ad6 | ||
|
|
268e4d595e | ||
|
|
10f417eb7c | ||
|
|
90868864ab | ||
| e2389321ce | |||
| 8fcb422592 | |||
| b9dbd3c4c3 |
@@ -44,27 +44,33 @@
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DigitalData.Modules.Logging, Version=2.5.4.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<Reference Include="DigitalData.Modules.Base, Version=1.3.6.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
<HintPath>..\..\..\2_DLL Projekte\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.6.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.WINDREAMLib">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WINDREAMLib.dll</HintPath>
|
||||
<Reference Include="DigitalData.Modules.Messaging, Version=1.9.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Messaging\bin\Debug\DigitalData.Modules.Messaging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.WINDREAMLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<EmbedInteropTypes>False</EmbedInteropTypes>
|
||||
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WINDREAMLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.WMOBRWSLib">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOBRWSLib.dll</HintPath>
|
||||
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WMOBRWSLib.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Interop.WMOSRCHLib">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOSRCHLib.dll</HintPath>
|
||||
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WMOSRCHLib.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Interop.WMOTOOLLib">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOTOOLLib.dll</HintPath>
|
||||
<HintPath>M:\Bibliotheken\3rdParty\windream\Interop.WMOTOOLLib.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -105,7 +111,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" />
|
||||
|
||||
@@ -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("3.1.0.0")>
|
||||
<Assembly: AssemblyFileVersion("3.1.0.0")>
|
||||
|
||||
@@ -15,7 +15,7 @@ Option Explicit On
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.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
|
||||
|
||||
@@ -26,103 +26,6 @@ Public Class clsDatabase
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Public Function ExecuteonOracleDb(CONSTRING As String, ByVal plsqlcommand As String)
|
||||
Try
|
||||
Logger.Debug("plsqlcommand: " & plsqlcommand)
|
||||
' die nötigen Variablen definieren
|
||||
Dim result As Object = Nothing
|
||||
Dim conn As New OracleConnectionStringBuilder
|
||||
|
||||
Dim Oracle_Conn As OracleConnection = New OracleConnection(CONSTRING)
|
||||
Dim Oracle_Command As OracleCommand = Nothing
|
||||
Dim DataAdapter As OracleDataAdapter = Nothing
|
||||
|
||||
' Verbindung zur Datenbank aufbauen
|
||||
Try
|
||||
Oracle_Conn.Open()
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
'clsLogger.Add(ex.Message, True, "clsDatatabase.ExecuteonOracleDb(OpenConnection)")
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
' SQL-Abfrage definieren
|
||||
Try
|
||||
Oracle_Command = New OracleCommand(plsqlcommand, Oracle_Conn)
|
||||
Oracle_Command.AddToStatementCache = True
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn($"PLSQL-Command: [{plsqlcommand}]")
|
||||
Logger.Error(ex)
|
||||
'clsLogger.Add(ex.Message, True, "clsDatatabase.plsqlcommandDefine")
|
||||
Oracle_Conn.Close()
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
' *** Ausführen des Command ***
|
||||
If Command() IsNot Nothing Then
|
||||
Try
|
||||
|
||||
Oracle_Command.ExecuteNonQuery()
|
||||
' DB-Connection schliessen
|
||||
Oracle_Conn.Close()
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn($"PLSQL-Command: [{plsqlcommand}]")
|
||||
Logger.Error(ex)
|
||||
'clsLogger.Add(ex.Message & vbNewLine & "Execute Command => (" & plsqlcommand & ")", True, "clsDatatabase.ExecuteonOracleDb")
|
||||
Oracle_Conn.Close()
|
||||
|
||||
Return False
|
||||
End Try
|
||||
|
||||
Else
|
||||
Logger.Info("SQL-Command ist ungültig bzw konnte nicht erstellt werden (SQL: " & plsqlcommand & ")")
|
||||
' kann eintreten, wenn entweder die SQL-Anweisung falsch ist oder wenn die DataConnection nicht richtig aufgebaut werden konnte
|
||||
' Eintrag in Logdatei machen
|
||||
'clsLogger.Add("SQL-Command ist ungültig bzw konnte nicht erstellt werden (SQL: " & plsqlcommand & ")", True, "clsDatatabase.ExecuteonOracleDb")
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn($"PLSQL-Command: [{plsqlcommand}]")
|
||||
Logger.Error(ex)
|
||||
'clsLogger.Add("Unexpected Error in ExecuteonOracleDb: " & ex.Message & vbNewLine & "SQL: " & plsqlcommand, True, "clsDatatabase.ExecuteonOracleDb")
|
||||
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Function Oracle_CS_Test(CONSTRING As String)
|
||||
Try
|
||||
Dim conn As New OracleConnectionStringBuilder
|
||||
|
||||
Dim Oracle_Conn As OracleConnection = New OracleConnection(CONSTRING)
|
||||
|
||||
' Verbindung zur Datenbank aufbauen
|
||||
Try
|
||||
Oracle_Conn.Open()
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
'clsLogger.Add(ex.Message, True, "clsDatatabase.Oracle_CS_Test(OpenConnection)")
|
||||
Return False
|
||||
End Try
|
||||
Oracle_Conn.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
'clsLogger.Add("Unexpected Error in Oracle_CS_Test: " & ex.Message, True, "clsDatatabase.Oracle_CS_Test")
|
||||
' an dieser Stelle sollte jeder unvorhergesehene Fehler der Funktion abgefangen werden
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Function MSSQL_CS_Test(CONSTRING As String)
|
||||
Try
|
||||
|
||||
@@ -331,71 +234,4 @@ Public Class clsDatabase
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Function OracleExecute_Scalar(cmdscalar As String, OracleConnection As String)
|
||||
Dim result
|
||||
Try
|
||||
Logger.Debug("cmdscalar: " & cmdscalar)
|
||||
Dim SQLconnect As New OracleConnection
|
||||
Dim SQLcommand As New OracleCommand
|
||||
SQLconnect.ConnectionString = OracleConnection
|
||||
SQLconnect.Open()
|
||||
SQLcommand = SQLconnect.CreateCommand
|
||||
'Update Last Created Record in Foo
|
||||
SQLcommand.CommandText = cmdscalar
|
||||
result = SQLcommand.ExecuteScalar()
|
||||
SQLcommand.Dispose()
|
||||
SQLconnect.Close()
|
||||
Return result
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
'clsLogger.Add("Error in OracleExecute_Scalar: " & ex.Message, True)
|
||||
'clsLogger.Add("#SQL: " & cmdscalar, False)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Function OracleExecute_non_Query(ExecuteCMD As String, OracleConnection As String, Optional userInput As Boolean = False)
|
||||
Try
|
||||
Logger.Debug("ExecuteCMD: " & ExecuteCMD)
|
||||
Dim SQLconnect As New OracleConnection
|
||||
Dim SQLcommand As OracleCommand
|
||||
SQLconnect.ConnectionString = OracleConnection
|
||||
SQLconnect.Open()
|
||||
SQLcommand = SQLconnect.CreateCommand
|
||||
'Update Last Created Record in Foo
|
||||
SQLcommand.CommandText = ExecuteCMD
|
||||
SQLcommand.ExecuteNonQuery()
|
||||
SQLcommand.Dispose()
|
||||
SQLconnect.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
'clsLogger.Add("Error in OracleExecute_non_Query: " & ex.Message, True)
|
||||
'clsLogger.Add("#SQL: " & ExecuteCMD, False)
|
||||
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Oracle_Return_Datatable(Select_anweisung As String, OracleConnection As String, Optional userInput As Boolean = False)
|
||||
Try
|
||||
Logger.Debug("Select_anweisung: " & Select_anweisung)
|
||||
Dim SQLconnect As New OracleConnection
|
||||
Dim SQLcommand As OracleCommand
|
||||
SQLconnect.ConnectionString = OracleConnection
|
||||
SQLconnect.Open()
|
||||
SQLcommand = SQLconnect.CreateCommand
|
||||
SQLcommand.CommandText = Select_anweisung
|
||||
|
||||
Dim adapter1 As OracleDataAdapter = New OracleDataAdapter(SQLcommand)
|
||||
Dim dt As DataTable = New DataTable()
|
||||
adapter1.Fill(dt)
|
||||
SQLconnect.Close()
|
||||
Return dt
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
'clsLogger.Add("Error in Oracle_Return_Datatable: " & ex.Message, True)
|
||||
'clsLogger.Add("#SQL: " & Select_anweisung, False)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -529,16 +531,11 @@ Public Class clsDateiverarbeitung
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
If _database.ExecuteonOracleDb(OracleCS, result) = True Then
|
||||
Return True
|
||||
Else
|
||||
Logger.Warn($"Executing Oracle Command is no longer implemented")
|
||||
Return False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -699,6 +696,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.ToString, 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,12 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Messaging
|
||||
Imports DigitalData.Modules.Messaging.Mail
|
||||
|
||||
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,12 +47,27 @@ 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
|
||||
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
|
||||
Dim oSession = _mail.Connect(oMAILSMTP, oMAIL_PORT, oMAIL_USER, oPWPlain, oMAIL_AUTH_TYPE)
|
||||
If oSession.Connected = 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("Email_Send_Independentsoft was not successfull!")
|
||||
Logger.Warn("ConnectToServer was not successfull!")
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
|
||||
@@ -3,10 +3,14 @@ Imports System.IO
|
||||
Imports System.Text
|
||||
Imports Newtonsoft.Json
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Messaging
|
||||
Imports DigitalData.Modules.Messaging.Mail
|
||||
Imports DigitalData.Modules.Messaging.Mail.MailSession
|
||||
|
||||
Public Class clsProfil
|
||||
Inherits clsCURRENT
|
||||
Dim Logger As Logger
|
||||
Dim MyLogConfig As LogConfig
|
||||
#Region "***** Variablen *****"
|
||||
Private Shared CriticalError As Boolean = False
|
||||
Private windream As clsWindream_allgemein
|
||||
@@ -14,30 +18,31 @@ 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)
|
||||
Logger = MyLogger.GetLogger()
|
||||
windream = New clsWindream_allgemein(MyLogger)
|
||||
windream_index = New clsWindream_Index(MyLogger)
|
||||
_database = New clsDatabase(MyLogger)
|
||||
_dateiverarbeitung = New clsDateiverarbeitung(MyLogger)
|
||||
_email = New clsEmail(MyLogger)
|
||||
_JobWork = New clsJob_Work(MyLogger, _email)
|
||||
Sub New(pLogConfig As LogConfig, PROFIL_ID As Integer)
|
||||
Logger = pLogConfig.GetLogger()
|
||||
MyLogConfig = pLogConfig
|
||||
windream = New clsWindream_allgemein(pLogConfig)
|
||||
windream_index = New clsWindream_Index(pLogConfig)
|
||||
_database = New clsDatabase(pLogConfig)
|
||||
_dateiverarbeitung = New clsDateiverarbeitung(pLogConfig)
|
||||
_email = New MailSender(pLogConfig)
|
||||
_JobWork = New clsJob_Work(pLogConfig, _email)
|
||||
|
||||
End Sub
|
||||
Public Function Init(PROFIL_ID As Integer)
|
||||
Public Function Init(PROFIL_ID As Integer, pManual As Boolean)
|
||||
Try
|
||||
Logger.Debug("Start Initialisierung Profil für GUID: " & PROFIL_ID.ToString)
|
||||
Dim DT As DataTable = _database.Return_Datatable("Select * from TBWMRH_PROFIL where GUID = " & PROFIL_ID)
|
||||
If DT.Rows.Count > 0 Then
|
||||
If DT.Rows.Count = 1 Then
|
||||
For Each DR As DataRow In DT.Rows
|
||||
_profGUID = PROFIL_ID
|
||||
_Profilname = CStr(DR.Item("Profilname"))
|
||||
Logger.Debug("Check Profilname '" & _Profilname & "', GUID: " & _profGUID & " geladen")
|
||||
' Überprüfen ob Profil aktiv oder inaktiv
|
||||
If CBool(DR.Item("Aktiv")) = False Then
|
||||
If CBool(DR.Item("Aktiv")) = False And pManual = False Then
|
||||
Logger.Info("## Profil '" & _Profilname & "' ist inaktiv geschaltet")
|
||||
Return False
|
||||
Else
|
||||
@@ -62,23 +67,24 @@ Public Class clsProfil
|
||||
|
||||
End Function
|
||||
'Durchlauf des Profils wird aus dem Service gestartet wenn Init = True war
|
||||
Public Function Profil_Durchlauf(manually As Boolean) As Boolean
|
||||
Public Function Profil_Durchlauf(pManRun As Boolean) As Boolean
|
||||
Dim _error As Boolean = False
|
||||
Try
|
||||
Dim Run_Profile As Boolean = False
|
||||
Dim oRunProfile As Boolean = False
|
||||
If pManRun = False Then
|
||||
'Soll die Verarbeitung heute durchgeführt werden??
|
||||
Dim Dayofweek As Integer = My.Computer.Clock.LocalTime.DayOfWeek
|
||||
Dim SUBS As Integer = 0
|
||||
Dim RUNTODAY As Integer = 0
|
||||
If Dayofweek = 0 Then
|
||||
SUBS = 6
|
||||
Else
|
||||
|
||||
End If
|
||||
RUNTODAY = _profDay.Substring(Dayofweek - 1, 1)
|
||||
|
||||
|
||||
If _profDay.Substring(Dayofweek - 1, 1) = 1 Then
|
||||
oRunProfile = True
|
||||
Else
|
||||
Logger.Info("Verarbeitung für JETZT NICHT konfiguriert")
|
||||
End If
|
||||
'Verarbeitung soll heute durchgeführt werden
|
||||
Logger.Debug("Verarbeitung soll heute durchgeführt werden!")
|
||||
Logger.Debug("_RunType: " & _profRunType)
|
||||
@@ -94,11 +100,11 @@ Public Class clsProfil
|
||||
Logger.Debug("_RunTime.ToShortTimeString: " & _RunTime.ToShortTimeString & " # " & "Now.ToShortTimeString: " & Now.ToShortTimeString)
|
||||
If Time_next.ToString.StartsWith("11.11.1911") Then
|
||||
Logger.Info("Manueller Durchlauf des Profils - 11.11.1911")
|
||||
Run_Profile = True
|
||||
oRunProfile = True
|
||||
Else
|
||||
'Ist die Uhrzeit in der Range
|
||||
If _RunTime.ToShortTimeString = Now.ToShortTimeString Then
|
||||
Run_Profile = True
|
||||
oRunProfile = True
|
||||
Else
|
||||
Logger.Debug("No run as " & _RunTime.ToShortTimeString & "<>" & Now.ToShortTimeString)
|
||||
End If
|
||||
@@ -113,18 +119,20 @@ Public Class clsProfil
|
||||
|
||||
If DiffMin >= CInt(arr(1)) Then
|
||||
'Den Durchlauf erlauben
|
||||
Run_Profile = True
|
||||
oRunProfile = True
|
||||
Else
|
||||
Logger.Debug("No run as DiffMin (" & DiffMin & ") <= Intervall(" & arr(1) & ")")
|
||||
End If
|
||||
Case Else
|
||||
Logger.Warn("_profRunType konnte nicht ausgewertet werden - " & arr(0))
|
||||
End Select
|
||||
If Run_Profile = False And manually = True Then
|
||||
Logger.Info("This is a manual run of profile!")
|
||||
Run_Profile = True
|
||||
Else
|
||||
Logger.Info("### This is a manual run of profile! ###")
|
||||
oRunProfile = True
|
||||
End If
|
||||
If Run_Profile = True Then
|
||||
|
||||
|
||||
If oRunProfile = True Then
|
||||
Logger.Debug($"'{_Profilname}' - Run_Profile = True")
|
||||
clsCURRENT.DT_TBDD_EMAIL = _database.Return_Datatable("SELECT * FROM TBDD_EMAIL_ACCOUNT WHERE ACTIVE = 1")
|
||||
clsCURRENT.PROFILE_HandledFiles = Nothing
|
||||
@@ -167,6 +175,16 @@ Public Class clsProfil
|
||||
oGesamtFiles = windreamSucheErgebnisse.Count
|
||||
Dim oCountDocs As Integer = 0
|
||||
Dim oEmailAttachment_path As String
|
||||
|
||||
|
||||
Dim MAILFROM As String = ""
|
||||
Dim MAILSMTP As String = ""
|
||||
Dim MAIL_USER As String = ""
|
||||
Dim MAIL_USER_PW As String = ""
|
||||
Dim MAIL_AUTH_TYPE As String = "SSL"
|
||||
Dim MAIL_PORT As String = "25"
|
||||
Dim MAILSession As SessionInfo
|
||||
|
||||
For Each WMdok As WMObject In windreamSucheErgebnisse
|
||||
|
||||
oEmailAttachment_path = String.Empty
|
||||
@@ -212,14 +230,8 @@ Public Class clsProfil
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
Dim MAILFROM As String = ""
|
||||
Dim MAILSMTP As String = ""
|
||||
Dim MAIL_USER As String = ""
|
||||
Dim MAIL_USER_PW As String = ""
|
||||
Dim MAIL_AUTH_TYPE As String = "SSL"
|
||||
Dim MAIL_PORT As String = "25"
|
||||
|
||||
If oCountDocs = 1 Then
|
||||
Logger.Debug("##### EMAIL BASICS CONSTRUCT (oCountDocs = 1) ######")
|
||||
For Each emailrow As DataRow In clsCURRENT.DT_TBDD_EMAIL.Rows
|
||||
If emailrow.Item("GUID") = CInt(EMAIL_PROFIL) Then
|
||||
MAILFROM = emailrow.Item("EMAIL_FROM")
|
||||
@@ -249,21 +261,61 @@ Public Class clsProfil
|
||||
Email_Empfänger = _dateiverarbeitung.REGEX_REPLACE(WMdok, Email_Empfänger)
|
||||
Logger.Debug("Email_Empfänger: " & Email_Empfänger)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
oEmail_Betreff = _dateiverarbeitung.REGEX_REPLACE(WMdok, oEmail_Betreff)
|
||||
Email_Body = _dateiverarbeitung.REGEX_REPLACE(WMdok, Email_Body)
|
||||
oEmail_Betreff = $"{oEmail_Betreff} [eMail {oCountDocs} von {oGesamtFiles}]"
|
||||
If oAttachment_FullFilename <> String.Empty Then
|
||||
Logger.Warn($"Email Attachment {oAttachment_FullFilename}")
|
||||
Logger.Info($"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
|
||||
|
||||
FileJobSuccessful = True
|
||||
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
|
||||
|
||||
Dim oReInit As Boolean = False
|
||||
If oCountDocs = 1 Or IsNothing(MAILSession) Then
|
||||
Logger.Debug("Init MAILSession...")
|
||||
oReInit = True
|
||||
ElseIf IsNothing(_email) Or _email.Connected2Server = False Or MAILSession.Connected = False Then
|
||||
Logger.Info("Re-Init MAILSession...")
|
||||
oReInit = True
|
||||
End If
|
||||
If oReInit = True Then
|
||||
_email = New MailSender(MyLogConfig)
|
||||
MAILSession = _email.Connect(MAILSMTP, MAIL_PORT, MAIL_USER, MAIL_USER_PW, MAIL_AUTH_TYPE)
|
||||
If MAILSession.Connected = True Then
|
||||
Logger.Info($"MAIL: Connection to {MAILSMTP} successfull!")
|
||||
Else
|
||||
|
||||
Logger.Warn($"{oFileRunNo} Email_Send_Independentsoft 1 was not successfull!")
|
||||
Logger.Warn($"{oFileRunNo} - _email.Connect 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
|
||||
FileJobSuccessful = False
|
||||
Logger.Info("Setting MAILSession.Connected to [false]")
|
||||
MAILSession.Connected = 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 +364,8 @@ Public Class clsProfil
|
||||
|
||||
End Select
|
||||
Next
|
||||
|
||||
|
||||
'##################################
|
||||
'JETZT DER DURCHLAUF DER DATEI-JOBS
|
||||
'##################################
|
||||
@@ -319,7 +373,7 @@ Public Class clsProfil
|
||||
'Für jeden File-Job
|
||||
For Each DR_PR_FILE_JOB As DataRow In DT_PROFIL_FILE_JOB.Rows
|
||||
If FileJobSuccessful = False Then
|
||||
Logger.Info($"{oFileRunNo} AUSSTIEG FOR SCHLEIFE cause FileJobSuccessful = False...")
|
||||
Logger.Info($"{oFileRunNo} FileJobSuccessful = False...Exit For")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -446,8 +500,19 @@ 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
|
||||
Logger.Warn("KEINE File-JOBS für Profil '" & _Profilname & "' angelegt!")
|
||||
_email.Disconnect()
|
||||
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)
|
||||
@@ -561,12 +626,12 @@ Public Class clsProfil
|
||||
Dim EMAIL_PROFIL = DR_PR_JB.Item("STRING4")
|
||||
Logger.Debug("EMAIL_PROFIL: " & EMAIL_PROFIL)
|
||||
If Not IsNothing(clsCURRENT.DT_TBDD_EMAIL) And clsCURRENT.DT_TBDD_EMAIL.Rows.Count >= 1 Then
|
||||
Dim MAILFROM As String = ""
|
||||
Dim MAILSMTP As String = ""
|
||||
Dim MAIL_USER As String = ""
|
||||
Dim MAIL_USER_PW As String = ""
|
||||
Dim MAIL_AUTH_TYPE As String = "SSL"
|
||||
Dim MAIL_PORT As Integer
|
||||
MAILFROM = ""
|
||||
MAILSMTP = ""
|
||||
MAIL_USER = ""
|
||||
MAIL_USER_PW = ""
|
||||
MAIL_AUTH_TYPE = "SSL"
|
||||
MAIL_PORT = 0
|
||||
|
||||
For Each emailrow As DataRow In clsCURRENT.DT_TBDD_EMAIL.Rows
|
||||
If emailrow.Item("GUID") = CInt(EMAIL_PROFIL) Then
|
||||
@@ -594,14 +659,41 @@ 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
|
||||
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 Not IsNothing(_email) And _email.Connected2Server = False And MAILSession.Connected = True Then
|
||||
Logger.Debug("Re/init MAILSession(2)...")
|
||||
MAILSession = _email.Connect(MAILSMTP, MAIL_PORT, MAIL_USER, MAIL_USER_PW, MAIL_AUTH_TYPE)
|
||||
If MAILSession.Connected = True Then
|
||||
Logger.Info($"MAIL: Connection to {MAILSMTP} successfull!")
|
||||
Else
|
||||
Logger.Warn("Email_Send_Independentsoft 2 was not successfull!")
|
||||
Logger.Warn($"{oFileRunNo} Email_ConnectToServer was not successfull!")
|
||||
FileJobSuccessful = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If MAILSession.Connected = True Then
|
||||
If _email.SendMail(oSendto, MAILFROM, Email_Betreff, Email_Body, Now, oAttMt, 0) = True Then
|
||||
FileJobSuccessful = True
|
||||
Else
|
||||
Logger.Warn("Email_SendMail(2) was not successfull!")
|
||||
FileJobSuccessful = False
|
||||
End If
|
||||
_email.Disconnect()
|
||||
Else
|
||||
Logger.Warn($"Email_ConnectToServer(2) was not successfull!")
|
||||
FileJobSuccessful = False
|
||||
End If
|
||||
|
||||
Else
|
||||
Logger.Warn("DT_TBDD_EMAIL is nothing or contains no rows")
|
||||
@@ -619,10 +711,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 +730,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
|
||||
@@ -698,9 +801,7 @@ Public Class clsProfil
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
Logger.Info("Verarbeitung für JETZT NICHT konfiguriert")
|
||||
End If
|
||||
|
||||
'Abschluss des Profiles
|
||||
_database.Execute_non_Query("UPDATE TBWMRH_PROFIL SET Running = 0 WHERE GUID = " & _profGUID)
|
||||
Return True
|
||||
|
||||
@@ -10,7 +10,7 @@ Imports WMOSRCHLib
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class clsWindream_allgemein
|
||||
Public Class ClsWindream_allgemein
|
||||
Dim Logger As Logger
|
||||
#Region "+++++ Konstanten +++++"
|
||||
Const DEBUG = AUS
|
||||
@@ -59,7 +59,13 @@ Public Class clsWindream_allgemein
|
||||
Try
|
||||
Dim oHourDifference As Integer
|
||||
oHourDifference = CInt(DateDiff(DateInterval.Hour, CURRENToWMSession_Created, Now))
|
||||
'If IsNothing(CURRENToWMConnect) Or oHourDifference >= 2 Then
|
||||
|
||||
If Not IsNothing(CURRENToWMSession) AndAlso CURRENToWMSession.aLoggedin AndAlso oHourDifference < 2 Then
|
||||
Logger.Debug("oWMSession already created!")
|
||||
oWMSession = CURRENToWMSession
|
||||
Return True
|
||||
End If
|
||||
|
||||
Try
|
||||
'Session-Objekt instanziieren und mit dem im Client ausgewählten Server belegen
|
||||
oWMSession = CreateObject("Windream.WMSession", GetCurrentServer)
|
||||
@@ -260,7 +266,8 @@ Public Class clsWindream_allgemein
|
||||
For Each index As String In indexnamen
|
||||
If index = indexname Then Return True
|
||||
Next
|
||||
|
||||
Logger.Warn($"Index '{indexname}' does not exist in Objecttype '{objekttyp}'")
|
||||
Return False
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
|
||||
|
||||
@@ -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="5.0.5" targetFramework="net461" />
|
||||
<package id="NLog" version="5.0.5" targetFramework="net462" />
|
||||
</packages>
|
||||
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="DDWDResultHandler.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
<section name="DDWDResultHandler.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</configSections>
|
||||
<connectionStrings/>
|
||||
<connectionStrings />
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
|
||||
</startup>
|
||||
<applicationSettings>
|
||||
<DDWDResultHandler.My.MySettings>
|
||||
@@ -19,31 +19,31 @@
|
||||
<setting name="SQLSERVER_CS_PMRefresh" serializeAs="String">
|
||||
<value>Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd</value>
|
||||
</setting>
|
||||
<setting name="PMREFRESH_INTERVALL" serializeAs="String">
|
||||
<value>2</value>
|
||||
<setting name="PMREFRESH_INTERVALL_MIN" serializeAs="String">
|
||||
<value>1</value>
|
||||
</setting>
|
||||
</DDWDResultHandler.My.MySettings>
|
||||
</applicationSettings>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
<parameters>
|
||||
<parameter value="v11.0"/>
|
||||
<parameter value="v11.0" />
|
||||
</parameters>
|
||||
</defaultConnectionFactory>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
|
||||
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||
</providers>
|
||||
</entityFramework>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -67,7 +67,7 @@ Public Class DDWDResultHandler
|
||||
' Set the Interval
|
||||
Timer_Durchlauf.Interval = 60000
|
||||
Timer_Durchlauf.Enabled = True
|
||||
Logger.Debug("Timer gestartet")
|
||||
Logger.Debug("Timer Resulthandler gestartet")
|
||||
' Und den Durchlauf das erste Mal starten
|
||||
|
||||
|
||||
@@ -84,9 +84,11 @@ Public Class DDWDResultHandler
|
||||
AddHandler TimerPMRefresh.Elapsed, AddressOf ThreadPMRefreshRun
|
||||
|
||||
' Set the Interval
|
||||
TimerPMRefresh.Interval = 120000 '2 minutes
|
||||
Dim oIntervallMS = (My.Settings.PMREFRESH_INTERVALL_MIN * 60000)
|
||||
TimerPMRefresh.Interval = oIntervallMS
|
||||
'ClassLogger.Add("Timer - Intervall: " & clsSQLITE.konf_intervall & " Minuten", False)
|
||||
TimerPMRefresh.Enabled = True
|
||||
Logger.Debug($"Timer PM Refresh gestartet, mit Intervall {My.Settings.PMREFRESH_INTERVALL_MIN} Minuten ")
|
||||
'End If
|
||||
If My.Settings.SQLSERVER_CS_RH = "" And My.Settings.SQLSERVER_CS_PMRefresh <> "" Then
|
||||
Logger.Info("Thread PM Refresh will now be started for initial Run as Resulthandler's ConnString is empty...")
|
||||
@@ -167,10 +169,21 @@ Public Class DDWDResultHandler
|
||||
_PROFIL_ID = CInt(DR.Item("GUID"))
|
||||
_profil = New clsProfil(MyLogger, _PROFIL_ID)
|
||||
'Und nun das Profil durchlaufen
|
||||
Dim initresult = _profil.Init(_PROFIL_ID)
|
||||
Dim initresult = _profil.Init(_PROFIL_ID, False)
|
||||
If initresult = True Then
|
||||
'##### Profildurchlauf ########
|
||||
_profil.Profil_Durchlauf(False)
|
||||
For Each oFile As String In clsCURRENT.TEMP_FILES
|
||||
If File.Exists(oFile) Then
|
||||
Try
|
||||
File.Delete(oFile)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
ElseIf initresult = False Then
|
||||
Logger.Warn("clsProfil konnte nicht initialisiert werden")
|
||||
notcompleted = True
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.1.1.0")>
|
||||
<Assembly: AssemblyFileVersion("2.1.0.0")>
|
||||
<Assembly: AssemblyVersion("2.5.0.0")>
|
||||
<Assembly: AssemblyFileVersion("2.5.0.0")>
|
||||
|
||||
@@ -15,7 +15,7 @@ Option Explicit On
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0"), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
@@ -76,10 +76,10 @@ Namespace My
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("2")> _
|
||||
Public ReadOnly Property PMREFRESH_INTERVALL() As Integer
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("1")> _
|
||||
Public ReadOnly Property PMREFRESH_INTERVALL_MIN() As Integer
|
||||
Get
|
||||
Return CType(Me("PMREFRESH_INTERVALL"),Integer)
|
||||
Return CType(Me("PMREFRESH_INTERVALL_MIN"),Integer)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
<Setting Name="SQLSERVER_CS_PMRefresh" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd</Value>
|
||||
</Setting>
|
||||
<Setting Name="PMREFRESH_INTERVALL" Type="System.Int32" Scope="Application">
|
||||
<Value Profile="(Default)">2</Value>
|
||||
<Setting Name="PMREFRESH_INTERVALL_MIN" Type="System.Int32" Scope="Application">
|
||||
<Value Profile="(Default)">1</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -52,9 +52,9 @@
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DigitalData.Modules.Logging, Version=2.5.4.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<Reference Include="DigitalData.Modules.Logging, Version=2.6.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
<HintPath>..\..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.4.4" targetFramework="net461" />
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
<package id="NLog" version="5.0.5" targetFramework="net461" />
|
||||
<package id="NLog" version="5.0.5" targetFramework="net462" />
|
||||
</packages>
|
||||
@@ -1,25 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="ResultHandler_Konfig.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
<section name="ResultHandler_Konfig.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</configSections>
|
||||
<connectionStrings>
|
||||
<add name="ResultHandler_Konfig.My.MySettings.SQLSERVER_CS" connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd" providerName="System.Data.SqlClient"/>
|
||||
<add name="ResultHandler_Konfig.My.MySettings.SQLSERVER_CS" connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd"
|
||||
providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<ResultHandler_Konfig.My.MySettings>
|
||||
<setting name="BNSAPI_HOST" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="EmailTestReceipiant" serializeAs="String">
|
||||
<value/>
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="Debug_Active" serializeAs="String">
|
||||
<value>False</value>
|
||||
@@ -35,32 +36,32 @@
|
||||
within the resulting "app.config" or "web.config" file.
|
||||
-->
|
||||
<DbProviderFactories>
|
||||
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/>
|
||||
<remove invariant="System.Data.SQLite"/>
|
||||
<remove invariant="System.Data.SQLite.EF6"/>
|
||||
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>
|
||||
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
|
||||
<remove invariant="System.Data.SQLite" />
|
||||
<remove invariant="System.Data.SQLite.EF6" />
|
||||
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
|
||||
</DbProviderFactories>
|
||||
</system.data>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
<parameters>
|
||||
<parameter value="v11.0"/>
|
||||
<parameter value="v11.0" />
|
||||
</parameters>
|
||||
</defaultConnectionFactory>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
|
||||
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||
</providers>
|
||||
</entityFramework>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0"/>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -54,17 +54,6 @@ Namespace My
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Secu"& _
|
||||
"rity Info=True;User ID=sa;Password=dd")> _
|
||||
Public ReadOnly Property SQLSERVER_CS() As String
|
||||
Get
|
||||
Return CType(Me("SQLSERVER_CS"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
@@ -100,6 +89,17 @@ Namespace My
|
||||
Me("Debug_Active") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Secu"& _
|
||||
"rity Info=True;User ID=sa;Password=dd")> _
|
||||
Public ReadOnly Property SQLSERVER_CS() As String
|
||||
Get
|
||||
Return CType(Me("SQLSERVER_CS"),String)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
@@ -2,14 +2,6 @@
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="SQLSERVER_CS" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<ConnectionString>Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</ConnectionString>
|
||||
<ProviderName>System.Data.SqlClient</ProviderName>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</Value>
|
||||
</Setting>
|
||||
<Setting Name="BNSAPI_HOST" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
@@ -19,5 +11,13 @@
|
||||
<Setting Name="Debug_Active" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="SQLSERVER_CS" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ConnectionString>Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</ConnectionString>
|
||||
<ProviderName>System.Data.SqlClient</ProviderName>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1 @@
|
||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
|
||||
@@ -68,11 +68,15 @@
|
||||
<Reference Include="DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.XtraPrinting.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DigitalData.Modules.Base, Version=1.0.0.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
|
||||
</Reference>
|
||||
<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, Version=1.7.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<Reference Include="DigitalData.Modules.Messaging, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\DDModules\Messaging\bin\Debug\DigitalData.Modules.Messaging.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -98,6 +102,9 @@
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOTOOLLib.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Mail">
|
||||
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Limilabs\Mail.dll\Mail.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<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>
|
||||
|
||||
@@ -4,6 +4,7 @@ Imports DigitalData.Modules.Messaging
|
||||
Imports DD_WMResulthandler
|
||||
Imports System.Net.Mail
|
||||
Imports System.Net
|
||||
Imports DigitalData.Modules.Messaging.Mail
|
||||
|
||||
Public Class frmMain
|
||||
Private _windream As clsWindream_allgemein
|
||||
@@ -732,7 +733,7 @@ Public Class frmMain
|
||||
For Each DR As DataRow In DT.Rows
|
||||
clsCURRENT._PROFIL_ID = CInt(DR.Item("GUID"))
|
||||
'Und nun das Profil durchlaufen
|
||||
Dim initresult = _profil.Init(clsCURRENT._PROFIL_ID)
|
||||
Dim initresult = _profil.Init(clsCURRENT._PROFIL_ID, True)
|
||||
If initresult = True Then
|
||||
_profil.Profil_Durchlauf(True)
|
||||
ElseIf initresult = False Then
|
||||
@@ -910,19 +911,39 @@ Public Class frmMain
|
||||
|
||||
End Sub
|
||||
Private Sub btnsendtestmail_Click(sender As Object, e As EventArgs) Handles btnsendtestmail.Click
|
||||
Dim _ss2email As New Email(MyLogger)
|
||||
' Dim _ss2email As New Email(MyLogger)
|
||||
Dim oSender As New MailSender(MyLogger)
|
||||
|
||||
If txtTestmailTo.Text <> String.Empty Then
|
||||
My.Settings.Save()
|
||||
Dim wrapper As New clsEncryption("!35452didalog=")
|
||||
|
||||
Dim PWPlain = wrapper.DecryptData(EMAIL_PWTextBox.Text)
|
||||
If _ss2email.NewEmail(txtTestmailTo.Text, "Testmail from GUI WMResultHandler", "This is the body (text will be replaced within profile)", EMAIL_FROMTextBox.Text, EMAIL_SMTPTextBox.Text,
|
||||
PORTTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, AUTH_TYPEComboBox.Text, "GUI WMRH - Test") = True Then
|
||||
MsgBox("Email(s) has/have been sent successfully.", MsgBoxStyle.Information)
|
||||
Dim oSession = oSender.Connect(EMAIL_SMTPTextBox.Text, PORTTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, AUTH_TYPEComboBox.Text)
|
||||
If oSession.Connected = True Then
|
||||
Dim oSendto As New List(Of String)
|
||||
oSendto.Add(txtTestmailTo.Text)
|
||||
Dim oAttMt As New List(Of String)
|
||||
If txtAttachment.Text <> String.Empty Then
|
||||
oAttMt.Add(txtAttachment.Text)
|
||||
End If
|
||||
If oSender.SendMail(oSendto, EMAIL_FROMTextBox.Text, "Testmail from GUI WMResultHandler", "TEST", Now, oAttMt, 1) = True Then
|
||||
MsgBox("Email has been sent successfully.", MsgBoxStyle.Information)
|
||||
Else
|
||||
MsgBox("Could not send the testmail. Please check the log.", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
oSender.Disconnect()
|
||||
Else
|
||||
MsgBox("Could not connect to server. Please check the log.", MsgBoxStyle.Exclamation)
|
||||
|
||||
End If
|
||||
' Dim oSMTP As SmtpClient = llmail.New_SMTPConnection(Nothing, EMAIL_SMTPTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, AUTH_TYPEComboBox.Text, PORTTextBox.Text)
|
||||
'If _ss2email.NewEmail(txtTestmailTo.Text, "Testmail from GUI WMResultHandler", "This is the body (text will be replaced within profile)", EMAIL_FROMTextBox.Text, EMAIL_SMTPTextBox.Text,
|
||||
' PORTTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, AUTH_TYPEComboBox.Text, "GUI WMRH - Test") = True Then
|
||||
' MsgBox("Email(s) has/have been sent successfully.", MsgBoxStyle.Information)
|
||||
' Else
|
||||
' MsgBox("Could not send the testmail. Please check the log.", MsgBoxStyle.Exclamation)
|
||||
' End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.4.4" targetFramework="net461" />
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
<package id="NLog" version="5.0.5" targetFramework="net461" />
|
||||
<package id="NLog" version="5.0.5" targetFramework="net462" />
|
||||
<package id="System.Data.SQLite" version="1.0.94.1" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user