refactor(EnvelopeGenerator.Common): umbenennen in EnvelopeGenerator.CommonService

This commit is contained in:
Developer 02
2025-05-26 11:14:12 +02:00
parent a5261baec5
commit c1d46b446a
120 changed files with 93 additions and 93 deletions

View File

@@ -0,0 +1,32 @@
Imports DigitalData.Modules.Base
Imports EnvelopeGenerator.Domain.Constants
Imports EnvelopeGenerator.Domain.Entities
Public Class EmailTemplateModel
Inherits BaseModel
Public Sub New(pState As State)
MyBase.New(pState)
End Sub
Private Function ToEmailTemplate(pRow As DataRow) As EmailTemplate
Return New EmailTemplate() With {
.Id = pRow.ItemEx("GUID", 0),
.Name = pRow.ItemEx("NAME", ""),
.Body = pRow.ItemEx("BODY", ""),
.Subject = pRow.ItemEx("SUBJECT", "")
}
End Function
Public Function GetById(pEmailTemplateName As EmailTemplateType) As EmailTemplate
Dim oSql As String = $"SELECT * FROM TBSIG_EMAIL_TEMPLATE WHERE NAME = '{pEmailTemplateName}'"
Dim oTable As DataTable = Database.GetDatatable(oSql)
If oTable.Rows.Count = 0 Then
Return Nothing
End If
Dim oRow = oTable.Rows.Item(0)
Return ToEmailTemplate(oRow)
End Function
End Class