MS Use without WM

This commit is contained in:
2021-01-13 10:31:01 +01:00
parent 34368ce760
commit 03a6d14214
69 changed files with 206 additions and 79 deletions

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.6.0.0")>
<Assembly: AssemblyFileVersion("2.6.0.0")>
<Assembly: AssemblyVersion("2.8.0.0")>
<Assembly: AssemblyFileVersion("2.8.0.0")>

View File

@@ -16,13 +16,8 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.3.0.0" newVersion="6.3.0.0" />
<bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.data>
<DbProviderFactories>
<remove invariant="FirebirdSql.Data.FirebirdClient" />
<add name="FirebirdClient Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".NET Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient" />
</DbProviderFactories>
</system.data></configuration>
</configuration>

View File

@@ -12,18 +12,23 @@ Public Class clsWorkEmail
Private MyLogger As LogConfig
Private _email As clsEmail
Private _DB_MSSQL As clsDatabase
Private _USE_WM As Boolean
Private _windream As clsWindream_allgemein
Private _windream_index As clsWindream_Index
Private _firebird As Firebird
Private _worked_email As Boolean = False
Sub New(LogConf As LogConfig, ConStr As String, FB_DATASOURCE As String, FB_DATABASE As String, FB_USER As String, FB_PW As String)
Sub New(LogConf As LogConfig, ConStr As String, FB_DATASOURCE As String, FB_DATABASE As String, FB_USER As String, FB_PW As String, USE_WM As Boolean)
Try
Logger = LogConf.GetLogger
MyLogger = LogConf
_email = New clsEmail(LogConf)
_DB_MSSQL = New clsDatabase(LogConf, ConStr)
_windream = New clsWindream_allgemein(LogConf)
_windream_index = New clsWindream_Index(LogConf)
_USE_WM = USE_WM
If USE_WM Then
_windream = New clsWindream_allgemein(LogConf)
_windream_index = New clsWindream_Index(LogConf)
End If
If FB_DATASOURCE <> String.Empty Then
_firebird = New Firebird(LogConf, FB_DATASOURCE, FB_DATABASE, FB_USER, FB_PW)
End If
@@ -554,7 +559,7 @@ Public Class clsWorkEmail
Private Function INSERT_HISTORY_MSSQL()
If MessageError = False Then
Dim ins = $"INSERT INTO TBEMLP_HISTORY (WORK_PROCESS,EMAIL_MSGID,EMAIL_SUBJECT,EMAIL_DATE,EMAIL_BODY,EMAIL_SUBSTRING1,EMAIL_SUBSTRING2,EMAIL_FROM) VALUES " &
Dim ins = $"INSERT INTO TBEMLP_HISTORY (WORK_PROCESS,EMAIL_MSGID,EMAIL_SUBJECT,EMAIL_DATE,EMAIL_BODY,EMAIL_SUBSTRING1,EMAIL_SUBSTRING2,EMAIL_FROM,PROFILE_ID) VALUES " &
$"('{CURRENT_MAIL_PROCESS_NAME}'," &
$"'{CURRENT_MAIL_MESSAGE.MessageID.Replace("<", "").Replace(">", "")}'," &
$"'{CURRENT_MAIL_MESSAGE.Subject}'," &
@@ -562,7 +567,8 @@ Public Class clsWorkEmail
$"'{CURRENT_MAIL_BODY_ALL}'," &
$"'{CURRENT_MAIL_BODY_ANSWER1}'," &
$"'{CURRENT_MAIL_BODY_Substr2}'," &
$"'{CURRENT_MAIL_FROM}')"
$"'{CURRENT_MAIL_FROM}'," &
$"{CURRENT_PROFILE_GUID})"
_DB_MSSQL.Execute_non_Query(ins)
Else
Logger.Info("! No INSERT_HISTORY as MessageError = True")
@@ -700,7 +706,10 @@ Public Class clsWorkEmail
For Each row As DataRow In DT_INDEXING_STEPS.Rows
Dim INDEXNAME As String = row.Item("INDEXNAME")
Dim INDEXVALUE As String = row.Item("INDEXVALUE")
IndexFile(INDEXNAME, INDEXVALUE, False)
If _USE_WM Then
IndexFile(INDEXNAME, INDEXVALUE, False)
End If
Next

View File

@@ -7,21 +7,26 @@ Public Class clsWorker
Private _email As clsEmail
Private _emailIMAP As clsEmailIMAP
Private _Database As clsDatabase
Private _USE_WM As Boolean = False
Private _windream As clsWindream_allgemein
Private _windream_index As clsWindream_Index
Private _workmail As clsWorkEmail
Private _wrapper As clsEncryption
Private _POLL_PROFILEID As Integer = 0
Dim cs As String
Sub New(LogConf As LogConfig, ConStr As String, POLL_PROFILEID As Integer, FB_DATASOURCE As String, FB_DATABASE As String, FB_USER As String, FB_PW As String, Optional localeml As String = "")
Sub New(LogConf As LogConfig, ConStr As String, POLL_PROFILEID As Integer, FB_DATASOURCE As String, FB_DATABASE As String, FB_USER As String, FB_PW As String, USE_WM As Boolean, Optional localeml As String = "")
Logger = LogConf.GetLogger
_email = New clsEmail(LogConf)
_emailIMAP = New clsEmailIMAP(LogConf, ConStr)
_Database = New clsDatabase(LogConf, ConStr)
cs = ConStr
_windream = New clsWindream_allgemein(LogConf)
_windream_index = New clsWindream_Index(LogConf)
_workmail = New clsWorkEmail(LogConf, ConStr, FB_DATASOURCE, FB_DATABASE, FB_USER, FB_PW)
_USE_WM = USE_WM
If _USE_WM Then
_windream = New clsWindream_allgemein(LogConf)
_windream_index = New clsWindream_Index(LogConf)
End If
_workmail = New clsWorkEmail(LogConf, ConStr, FB_DATASOURCE, FB_DATABASE, FB_USER, FB_PW, USE_WM)
_wrapper = New clsEncryption("!35452didalog=", LogConf)
_POLL_PROFILEID = POLL_PROFILEID
ClassCurrent.CURRENT_DEBUG_LOCAL_EMAIL = localeml
@@ -41,32 +46,36 @@ Public Class clsWorker
If _Database.Init(cs) = True Then
Logger.Debug("now windream_init... ")
If _windream.Init = True Then
Logger.Debug("windream_initialized!")
Dim osql As String = "SELECT * FROM TBEMLP_POLL_PROFILES"
If _POLL_PROFILEID = 0 Then
osql &= " WHERE ACTIVE = 1 order by SEQUENCE"
If _USE_WM Then
If _windream.Init = False Then
Logger.Info("windream could not be initialized!!")
Exit Sub
Else
osql &= " WHERE GUID = " & _POLL_PROFILEID
Logger.Debug("windream_initialized!")
End If
Dim DT_TBDD_EMAIL As DataTable = _Database.Return_Datatable("SELECT * FROM TBDD_EMAIL_ACCOUNT WHERE ACTIVE = 1")
Dim DT_PROFILES = _Database.Return_Datatable(osql)
End If
Dim osql As String = "SELECT * FROM TBEMLP_POLL_PROFILES"
If _POLL_PROFILEID = 0 Then
osql &= " WHERE ACTIVE = 1 order by SEQUENCE"
Else
osql &= " WHERE GUID = " & _POLL_PROFILEID
End If
Dim DT_TBDD_EMAIL As DataTable = _Database.Return_Datatable("SELECT * FROM TBDD_EMAIL_ACCOUNT WHERE ACTIVE = 1")
Dim DT_PROFILES = _Database.Return_Datatable(osql)
If Not IsNothing(DT_PROFILES) Then
If DT_PROFILES.Rows.Count > 0 Then
Logger.Debug("count of active profiles: " & DT_PROFILES.Rows.Count.ToString)
For Each oDR_Profile As DataRow In DT_PROFILES.Rows
Logger.Debug("count of active profiles: " & DT_PROFILES.Rows.Count.ToString)
For Each oDR_Profile As DataRow In DT_PROFILES.Rows
CURRENT_PROFILE_GUID = oDR_Profile.Item("GUID")
DT_POLL_PROCESS = Nothing
Dim sql = String.Format("SELECT * FROM TBEMLP_POLL_PROCESS WHERE PROFILE_ID = {0} AND ACTIVE = 1", CURRENT_PROFILE_GUID)
DT_POLL_PROCESS = _Database.Return_Datatable(sql)
If Not IsNothing(DT_POLL_PROCESS) Then
If DT_POLL_PROCESS.Rows.Count = 0 Then
Logger.Info("No processes configured for this Email-Profile - " & sql)
Continue For
Else
DT_STEPS = Nothing
DT_POLL_PROCESS = _Database.Return_Datatable(sql)
If Not IsNothing(DT_POLL_PROCESS) Then
If DT_POLL_PROCESS.Rows.Count = 0 Then
Logger.Info("No processes configured for this Email-Profile - " & sql)
Continue For
Else
DT_STEPS = Nothing
DT_STEPS = _Database.Return_Datatable(String.Format("SELECT T.* FROM TBEMLP_POLL_STEPS T,TBEMLP_POLL_PROCESS T1 WHERE T.PROCESS_ID = T1.GUID AND T1.PROFILE_ID = {0} AND T1.ACTIVE = 1", CURRENT_PROFILE_GUID))
End If
@@ -193,10 +202,8 @@ Public Class clsWorker
Logger.Info("No active profiles")
End If
End If
Else
Logger.Info("windream could not be initialized!!")
End If
_Database.Execute_non_Query("UPDATE TBEMLP_CONFIG SET LAST_TICK = GETDATE() WHERE GUID = 1")
_Database.Execute_non_Query("UPDATE TBEMLP_CONFIG SET LAST_TICK = GETDATE() WHERE GUID = 1")
End If
Catch ex As Exception
Logger.Error(ex)

View File

@@ -20,7 +20,6 @@ E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin\Debug\Independentsoft.Email.xml
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin\Debug\NLog.xml
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin\Debug\S22.Imap.xml
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\bin\Debug\FirebirdSql.Data.FirebirdClient.pdb
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.Resources.resources
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.vbproj.GenerateResource.cache
E:\SchreiberM\Visual Studio\GIT\DD_EmailProfiler\App\DigitalData.EMLProfiler\obj\Debug\DigitalData.EMLProfiler.vbproj.CopyComplete