Compare commits
13 Commits
8fcb422592
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac71f0ce9a | ||
| 7f35fecfa2 | |||
| 45ca73af35 | |||
| 48f9673472 | |||
|
|
a70f006bb1 | ||
|
|
36e2d97b20 | ||
|
|
6add3760bd | ||
|
|
2a76d515cb | ||
|
|
52c3939ad6 | ||
|
|
268e4d595e | ||
|
|
10f417eb7c | ||
|
|
90868864ab | ||
| e2389321ce |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -44,30 +44,33 @@
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DigitalData.Modules.Base">
|
||||
<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">
|
||||
<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="DigitalData.Modules.Messaging">
|
||||
<HintPath>..\..\..\DDModules\Messaging\bin\Debug\DigitalData.Modules.Messaging.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" />
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.9.0.0")>
|
||||
<Assembly: AssemblyFileVersion("2.9.0.0")>
|
||||
<Assembly: AssemblyVersion("3.1.0.0")>
|
||||
<Assembly: AssemblyFileVersion("3.1.0.0")>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -531,16 +531,11 @@ Public Class clsDateiverarbeitung
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
If _database.ExecuteonOracleDb(OracleCS, result) = True Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Logger.Warn($"Executing Oracle Command is no longer implemented")
|
||||
Return False
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -703,7 +698,7 @@ Public Class clsDateiverarbeitung
|
||||
Logger.Debug("indexvalue read is: '" & wdIndexwert & "'")
|
||||
Try
|
||||
Dim oConvertDT As DateTime
|
||||
If DateTime.TryParse(wdIndexwert, oConvertDT) Then
|
||||
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")
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Messaging
|
||||
Imports DigitalData.Modules.Messaging.Mail
|
||||
|
||||
Public Class clsJob_Work
|
||||
Dim Logger As Logger
|
||||
@@ -56,7 +57,8 @@ Public Class clsJob_Work
|
||||
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
|
||||
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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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,54 +59,60 @@ 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)
|
||||
' Connection-Objekt instanziieren
|
||||
oConnect = CreateObject("Windream.WMConnect")
|
||||
'Session-Objekt instanziieren und mit dem im Client ausgewählten Server belegen
|
||||
oWMSession = CreateObject("Windream.WMSession", GetCurrentServer)
|
||||
' Connection-Objekt instanziieren
|
||||
oConnect = CreateObject("Windream.WMConnect")
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Could not create WMObjects Session or Connect: " & ex.Message)
|
||||
Logger.Warn("Could not create WMObjects Session or Connect: " & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
'wenn windream nicht angemeldet ist
|
||||
If Not IsLoggedIn() Then
|
||||
'Art der Anmeldung an windream festlegen
|
||||
'0x0L (also 0) = Standard windream Benutzer
|
||||
'WM_MODULE_ID_DOCTYPEEDITOR_LIC = ermöglicht Zugriff auf die windream Management Funktionen (Z.B. zur Verwaltung der windream Dokumententypen, Auswahllisten, etc.)
|
||||
'WM_MODULE_ID_INDEXSERVICE = ermöglicht der Session die Indexierungs-Events vom windream DMS-Service zu empfangen
|
||||
oConnect.ModuleID = 0
|
||||
'setzt die minimal erwartete windream-Version
|
||||
oConnect.MinReqVersion = "3"
|
||||
' Verbindung mit Session-Objekt (und dem ausgewählten Server) aufbauen
|
||||
oConnect.LoginSession(oWMSession)
|
||||
Logger.Debug("windream-UserName: '" & oConnect.UserName & "'")
|
||||
If oWMSession.aLoggedin = False Then
|
||||
Logger.Warn("Es konnte keine Verbindung mit dem windream-Server hergestellt werden")
|
||||
Return False
|
||||
End Try
|
||||
'wenn windream nicht angemeldet ist
|
||||
If Not IsLoggedIn() Then
|
||||
'Art der Anmeldung an windream festlegen
|
||||
'0x0L (also 0) = Standard windream Benutzer
|
||||
'WM_MODULE_ID_DOCTYPEEDITOR_LIC = ermöglicht Zugriff auf die windream Management Funktionen (Z.B. zur Verwaltung der windream Dokumententypen, Auswahllisten, etc.)
|
||||
'WM_MODULE_ID_INDEXSERVICE = ermöglicht der Session die Indexierungs-Events vom windream DMS-Service zu empfangen
|
||||
oConnect.ModuleID = 0
|
||||
'setzt die minimal erwartete windream-Version
|
||||
oConnect.MinReqVersion = "3"
|
||||
' Verbindung mit Session-Objekt (und dem ausgewählten Server) aufbauen
|
||||
oConnect.LoginSession(oWMSession)
|
||||
Logger.Debug("windream-UserName: '" & oConnect.UserName & "'")
|
||||
If oWMSession.aLoggedin = False Then
|
||||
Logger.Warn("Es konnte keine Verbindung mit dem windream-Server hergestellt werden")
|
||||
End If
|
||||
|
||||
Try
|
||||
If Not IsNothing(oWMSession) Then
|
||||
oWMSession.SwitchEvents(WMCOMEventWMSessionNeedIndex, False)
|
||||
' der Parameter WMEntityDocument definiert, dass nur Dokumenttypen und keine
|
||||
' Ordnertypen ausgelesen werden
|
||||
oDokumentTypen = oWMSession.GetWMObjectTypes(WINDREAMLib.WMEntity.WMEntityDocument)
|
||||
Else
|
||||
Logger.Warn("Unexpected...but the WMSession is nothing...")
|
||||
Return False
|
||||
End If
|
||||
|
||||
Try
|
||||
If Not IsNothing(oWMSession) Then
|
||||
oWMSession.SwitchEvents(WMCOMEventWMSessionNeedIndex, False)
|
||||
' der Parameter WMEntityDocument definiert, dass nur Dokumenttypen und keine
|
||||
' Ordnertypen ausgelesen werden
|
||||
oDokumentTypen = oWMSession.GetWMObjectTypes(WINDREAMLib.WMEntity.WMEntityDocument)
|
||||
Else
|
||||
Logger.Warn("Unexpected...but the WMSession is nothing...")
|
||||
Return False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Problem beim Auslesen der Objekttypen: " & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
Logger.Debug("Alles OK - Erfolgreich angemeldet und Session aufgebaut")
|
||||
CURRENToWMSession = oWMSession
|
||||
CURRENToWMSession_Created = Now
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Problem beim Auslesen der Objekttypen: " & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
Logger.Debug("Alles OK - Erfolgreich angemeldet und Session aufgebaut")
|
||||
CURRENToWMSession = oWMSession
|
||||
CURRENToWMSession_Created = Now
|
||||
Return True
|
||||
'Else
|
||||
' Logger.Debug("oWMSession already created!")
|
||||
' oWMSession = CURRENToWMSession
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<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>
|
||||
|
||||
@@ -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,7 +169,7 @@ 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)
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.3.0.0")>
|
||||
<Assembly: AssemblyFileVersion("2.3.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.3.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,8 +52,9 @@
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DigitalData.Modules.Logging">
|
||||
<HintPath>..\..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.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="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
<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" />
|
||||
|
||||
@@ -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.3.0.0"), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
@@ -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>
|
||||
@@ -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
|
||||
@@ -911,26 +912,27 @@ 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 llmail As New MailSender(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 llmail.ConnectToServer(EMAIL_SMTPTextBox.Text, PORTTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, AUTH_TYPEComboBox.Text) = True Then
|
||||
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 llmail.SendMail(oSendto, EMAIL_FROMTextBox.Text, "Testmail from GUI WMResultHandler", "TEST", Now, oAttMt, 1) = True Then
|
||||
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
|
||||
llmail.DisconnectFromServer()
|
||||
oSender.Disconnect()
|
||||
Else
|
||||
MsgBox("Could not connect to server. Please check the log.", MsgBoxStyle.Exclamation)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user