dynamische Mailvorlagen

This commit is contained in:
2024-04-18 17:00:38 +02:00
parent b9873a9863
commit 441a66bd61
6 changed files with 1005 additions and 43 deletions

View File

@@ -1,7 +1,40 @@

Imports System.Data.SqlClient
Imports System.Reflection
Imports System.Reflection
Public Class cTextkonserve_LIST
Public LIST As New List(Of cTextkonserve)
Dim SQL As New SQL
Sub New(txt_kategorie As String, txt_sprache As String, txt_FIRMA As String)
LOAD_LIST(txt_kategorie, txt_sprache, txt_FIRMA)
End Sub
Public Sub LOAD_LIST(txt_kategorie As String, txt_sprache As String, txt_FIRMA As String)
Try
LIST.Clear()
Dim sqlSprache As String = ""
If txt_sprache <> "" Then sqlSprache = " And txt_sprache = '" & txt_sprache & "'"
For Each r In SQL.loadDgvBySql("Select txt_Id FROM [tblTextkonserve] WHERE txt_kategorie='" & txt_kategorie & "' AND txt_FIRMA = '" & txt_FIRMA & "' and txt_dynMailvorlage = 1" & sqlSprache & " ORDER BY txt_kategorie asc", "FMZOLL").Rows
LIST.Add(New VERAG_PROG_ALLGEMEIN.cTextkonserve(r("txt_Id")))
Next
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
End Sub
End Class
Public Class cTextkonserve
Property txt_Id As Integer
Property txt_kategorie As String
@@ -10,7 +43,8 @@ Public Class cTextkonserve
Property txt_text As String
Property txt_betreff As String
Property txt_FIRMA As String
Property txt_firmaSig As Integer = 1
Property txt_firmaSig As Integer
Property txt_dynMailvorlage As Boolean
Public hasEntry As Boolean = False
@@ -38,7 +72,6 @@ Public Class cTextkonserve
End Sub
Public Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("txt_Id", txt_Id, , True, True))
@@ -49,6 +82,7 @@ Public Class cTextkonserve
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("txt_betreff", txt_betreff))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("txt_FIRMA", txt_FIRMA))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("txt_firmaSig", txt_firmaSig))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("txt_dynMailvorlage", txt_dynMailvorlage))
Return list
End Function
@@ -125,6 +159,7 @@ Public Class cTextkonserve
End Try
End Sub
Public Function getUpdateCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()