This commit is contained in:
PitzM 2024-02-28 10:48:20 +01:00
commit 9c5b0889ee
5 changed files with 35 additions and 5 deletions

View File

@ -1,6 +1,9 @@
<?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="DDEmailService.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
@ -13,4 +16,11 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<applicationSettings>
<DDEmailService.My.MySettings>
<setting name="MSSQL_SELECT" serializeAs="String">
<value>SELECT * FROM TBEMLP_EMAIL_OUT WHERE EMAIL_ADRESS &lt;&gt; '' and REMINDER_TYPE_ID = 202377 AND EMAIL_SENT IS NULL</value>
</setting>
</DDEmailService.My.MySettings>
</applicationSettings>
</configuration>

View File

@ -292,7 +292,13 @@ Public Class EmailService
oSQL = "SELECT * FROM TBEDM_EMAIL_QUEUE WHERE EMAIL_SENT IS NULL and EMAIL_TO <> ''"
oEmailQueue = _Firebird.GetDatatable(oSQL)
Case DatabaseType.MSSQL
oSQL = "SELECT * FROM TBEMLP_EMAIL_OUT WHERE EMAIL_SENT IS NULL and EMAIL_ADRESS <> ''"
If My.Settings.MSSQL_SELECT <> String.Empty Then
_Logger.Info("My.Settings.MSSQL_SELECT will be used..")
oSQL = My.Settings.MSSQL_SELECT
Else
oSQL = "SELECT * FROM TBEMLP_EMAIL_OUT WHERE EMAIL_SENT IS NULL and EMAIL_ADRESS <> ''"
End If
oEmailQueue = MSSQLInstance.GetDatatable(oSQL)
End Select

View File

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

View File

@ -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.4.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
@ -53,6 +53,16 @@ Namespace My
Return defaultInstance
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("SELECT * FROM TBEMLP_EMAIL_OUT WHERE EMAIL_ADRESS <> '' and REMINDER_TYPE_ID = 20"& _
"2377 AND EMAIL_SENT IS NULL")> _
Public ReadOnly Property MSSQL_SELECT() As String
Get
Return CType(Me("MSSQL_SELECT"),String)
End Get
End Property
End Class
End Namespace

View File

@ -1,5 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
<Profiles />
<Settings />
<Settings>
<Setting Name="MSSQL_SELECT" Type="System.String" Scope="Application">
<Value Profile="(Default)">SELECT * FROM TBEMLP_EMAIL_OUT WHERE EMAIL_ADRESS &lt;&gt; '' and REMINDER_TYPE_ID = 202377 AND EMAIL_SENT IS NULL</Value>
</Setting>
</Settings>
</SettingsFile>