EMailProfiler: Config-Daten in zentraler Klasse. abfrage der GDPicture Lizenz über Config-Modul
This commit is contained in:
@@ -3,6 +3,7 @@ Imports System.IO
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports System.Threading
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Patterns
|
||||
@@ -52,31 +53,48 @@ Public Class clsWorkEmail
|
||||
|
||||
Private _worked_email As Boolean = False
|
||||
|
||||
Sub New(LogConf As LogConfig, ConStr As String, WmConStr As String, pUseWindream As Boolean, EmailAccountID As Integer, EmlProfPraefix As String, pRejectionTemplateId As Integer, pInfoTemplateId As Integer)
|
||||
'Sub New(LogConf As LogConfig,
|
||||
' ConStr As String,
|
||||
' WmConStr As String,
|
||||
' pUseWindream As Boolean,
|
||||
' EmailAccountID As Integer,
|
||||
' EmlProfPraefix As String,
|
||||
' pRejectionTemplateId As Integer,
|
||||
' pInfoTemplateId As Integer,
|
||||
' pConfigData As ConfigData)
|
||||
Sub New(LogConf As LogConfig,
|
||||
ConStr As String,
|
||||
WmConStr As String,
|
||||
pConfigData As ConfigData)
|
||||
Try
|
||||
_Logger = LogConf.GetLogger
|
||||
_LogConfig = LogConf
|
||||
_DB_MSSQL = New MSSQLServer(LogConf, ConStr)
|
||||
_Logger.Debug("clsWorkmail _email initialized")
|
||||
_UseWindream = pUseWindream
|
||||
_UseWindream = pConfigData.UseWindream
|
||||
_Patterns = New Patterns2(LogConf)
|
||||
_RejectionTemplateId = pRejectionTemplateId
|
||||
_InfoTemplateId = pInfoTemplateId
|
||||
_RejectionTemplateId = pConfigData.RejectionTemplateId
|
||||
_InfoTemplateId = pConfigData.InfoTemplateId
|
||||
_Logger.Debug($"_RejectionTemplateId: {_RejectionTemplateId}")
|
||||
|
||||
_ValidExtensions = New List(Of String) From {"pdf", "xls", "xlsx", "doc", "docx", "ppt", "pptx"}
|
||||
_GraphicExtensions = New List(Of String) From {"jpg", "bmp", "jpeg", "gif", "png", "xml"}
|
||||
|
||||
If pUseWindream Then
|
||||
If _UseWindream Then
|
||||
_windream = New clsWindream_allgemein(LogConf)
|
||||
_windream_index = New clsWindream_Index(LogConf)
|
||||
_windreamConnectionString = WmConStr
|
||||
End If
|
||||
|
||||
_LicenseManager.RegisterKEY(GDPictureLicense)
|
||||
GDPictureLicense = ConfigDbFunct.GetProductLicense("GDPICTURE", pConfigData.GDPictureVersion, _LogConfig, ConStr)
|
||||
If String.IsNullOrEmpty(GDPictureLicense) = False Then
|
||||
_LicenseManager.RegisterKEY(GDPictureLicense)
|
||||
Else
|
||||
_Logger.Error("clsWorkEmail() No value for GDPictureLicense found!")
|
||||
End If
|
||||
|
||||
_EmailAccountID = EmailAccountID
|
||||
SUBJECT_PRAFIX = EmlProfPraefix
|
||||
_EmailAccountID = pConfigData.EmailAccountId
|
||||
SUBJECT_PRAFIX = pConfigData.EmailTitlePrefix
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
Reference in New Issue
Block a user