MS ClientSuite1
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
<setting name="FB_PW" serializeAs="String">
|
||||
<value>dd</value>
|
||||
</setting>
|
||||
<setting name="LOG_ERRORS_ONLY" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</DD_CommunicationService.My.MySettings>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
@@ -89,6 +89,15 @@ Namespace My
|
||||
Return CType(Me("FB_PW"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("True")> _
|
||||
Public ReadOnly Property LOG_ERRORS_ONLY() As Boolean
|
||||
Get
|
||||
Return CType(Me("LOG_ERRORS_ONLY"),Boolean)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
@@ -14,5 +14,8 @@
|
||||
<Setting Name="FB_PW" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">dd</Value>
|
||||
</Setting>
|
||||
<Setting Name="LOG_ERRORS_ONLY" Type="System.Boolean" Scope="Application">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -59,6 +59,9 @@ Public Class MyComService
|
||||
End Sub
|
||||
Public Sub RunThread_EmailQueue(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs)
|
||||
Try
|
||||
_MyLogger = New LogConfig(LogConfig.PathType.CustomPath, Path.Combine(My.Application.Info.DirectoryPath, "Log"))
|
||||
_Logger = _MyLogger.GetLogger()
|
||||
_MyLogger.Debug = My.Settings.LOG_ERRORS_ONLY
|
||||
_firebird = New Firebird(_MyLogger, My.Settings.FB_ConnString, My.Settings.FB_DATABASE, My.Settings.FB_USER, My.Settings.FB_PW)
|
||||
If _firebird._DBInitialized = False Then
|
||||
_Logger.Warn("Firebird-DB could not be intitialized!")
|
||||
@@ -76,11 +79,12 @@ Public Class MyComService
|
||||
Dim oEmailTo, oSubject, oBody As String
|
||||
Dim oEMAILACCOUNT_ID, oGUID, oJOB_ID As Integer
|
||||
For Each oEmail_Row As DataRow In oDT_EMAIL_QUEUE.Rows
|
||||
oEMAILACCOUNT_ID = oEmail_Row.Item("GUID")
|
||||
oEMAILACCOUNT_ID = oEmail_Row.Item("EMAIL_ACCOUNT_ID")
|
||||
Dim oMailFrom, oMailSMTP, oMailport, oMailUser, oMailPW, oAuthType As String
|
||||
|
||||
Dim oACCOUNT_MATCH As Boolean = False
|
||||
For Each oAccountRow As DataRow In oDT_EMAIL_ACCOUNT.Rows
|
||||
If oAccountRow.Item("GUID") = oEMAILACCOUNT_ID Then
|
||||
oACCOUNT_MATCH = True
|
||||
oMailFrom = oAccountRow.Item("EMAIL_FROM")
|
||||
oMailSMTP = oAccountRow.Item("SERVER_OUT")
|
||||
oMailport = oAccountRow.Item("PORT_OUT")
|
||||
@@ -100,11 +104,15 @@ Public Class MyComService
|
||||
End If
|
||||
Next
|
||||
If IsNothing(oMailFrom) Or IsNothing(oMailPW) Then
|
||||
_Logger.Warn("ACCOUNT-Infos are nothing!")
|
||||
If oACCOUNT_MATCH = True Then
|
||||
_Logger.Warn("ACCOUNT-Infos are nothing!")
|
||||
Else
|
||||
_Logger.Warn($"EMAIL_ACCOUNT_ID {oEMAILACCOUNT_ID} is not matching the configuration!")
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
oGUID = oEmail_Row.Item("GUID")
|
||||
oEmailTo = oEmail_Row.Item("EMAIL_TO")
|
||||
oSubject = oEmail_Row.Item("EMAIL_SUBJ")
|
||||
|
||||
Reference in New Issue
Block a user