Refactor SignatureLinkText to DocumentProcess property

Replaced SignatureLinkText with DocumentProcess in EmailData and updated all references. Adjusted DynamicStringsForEmails logic and template replacements accordingly. Added debug logging for template replacements. Bumped assembly version to 2.7.1.0.
This commit is contained in:
OlgunR
2026-03-04 09:30:29 +01:00
parent 92d88812e8
commit 0e2c653784
3 changed files with 9 additions and 9 deletions

View File

@@ -24,18 +24,18 @@ Public Class EmailData
Public ReadOnly Property EnvelopeTypeId As Integer = 0 Public ReadOnly Property EnvelopeTypeId As Integer = 0
Public Property SignatureType As String = "" Public Property SignatureType As String = ""
Public Property SignatureLinkText As String = "" Public Property DocumentProcess As String = ""
Public Sub DynamicStringsForEmails(pEnvelope As Entities.Envelope) Public Sub DynamicStringsForEmails(pEnvelope As Entities.Envelope)
If pEnvelope.EnvelopeTypeId = 1 Then If pEnvelope.EnvelopeTypeId = 1 Then
SignatureType = "Signieren" SignatureType = "Signieren"
Message = "Bitte lesen und unterzeichnen Sie dieses Dokument." Message = "Bitte lesen und unterzeichnen Sie dieses Dokument."
SignatureLinkText = " und elektronisch unterschreiben" DocumentProcess = " und elektronisch unterschreiben"
ElseIf pEnvelope.EnvelopeTypeId = 2 Then ElseIf pEnvelope.EnvelopeTypeId = 2 Then
SignatureType = "Lesen und bestätigen" SignatureType = "Lesen und bestätigen"
Message = "Bitte lesen und bestätigen Sie, dieses Dokument gelesen zu haben." Message = "Bitte lesen und bestätigen Sie, dieses Dokument gelesen zu haben."
SignatureLinkText = "" DocumentProcess = ""
End If End If
End Sub End Sub
@@ -63,7 +63,7 @@ Public Class EmailData
EnvelopeTitle = pEnvelope.Title EnvelopeTitle = pEnvelope.Title
EnvelopeTypeId = pEnvelope.EnvelopeTypeId EnvelopeTypeId = pEnvelope.EnvelopeTypeId
SignatureType = TextToHtml(SignatureType) SignatureType = TextToHtml(SignatureType)
SignatureLinkText = TextToHtml(SignatureLinkText) DocumentProcess = TextToHtml(DocumentProcess)
End Sub End Sub
Public Function TextToHtml(input As String) As String Public Function TextToHtml(input As String) As String
If String.IsNullOrEmpty(input) Then Return "" If String.IsNullOrEmpty(input) Then Return ""
@@ -105,7 +105,7 @@ Public Class EmailData
EnvelopeTitle = pEnvelope.Title EnvelopeTitle = pEnvelope.Title
EnvelopeTypeId = pEnvelope.EnvelopeTypeId EnvelopeTypeId = pEnvelope.EnvelopeTypeId
SignatureType = TextToHtml(SignatureType) SignatureType = TextToHtml(SignatureType)
SignatureLinkText = TextToHtml(SignatureLinkText) DocumentProcess = TextToHtml(DocumentProcess)
End Sub End Sub
End Class End Class

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' indem Sie "*" wie unten gezeigt eingeben: ' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.0.0")> <Assembly: AssemblyVersion("2.7.1.0")>
<Assembly: AssemblyFileVersion("2.7.0.0")> <Assembly: AssemblyFileVersion("2.7.1.0")>

View File

@@ -33,7 +33,7 @@ Public Class TemplateService
{"[MESSAGE]", pEmailData.Message}, {"[MESSAGE]", pEmailData.Message},
{"[DOCUMENT_ACCESS_CODE]", pEmailData.ReceiverAccessCode}, {"[DOCUMENT_ACCESS_CODE]", pEmailData.ReceiverAccessCode},
{"[REASON]", pReason}, {"[REASON]", pReason},
{"[SIGNATURE_LINK_TEXT]", pEmailData.SignatureLinkText} {"[DOCUMENT_PROCESS]", pEmailData.DocumentProcess}
} }
End Sub End Sub
@@ -82,7 +82,7 @@ Public Class TemplateService
For Each dictItem As KeyValuePair(Of String, String) In _replaceDictionary For Each dictItem As KeyValuePair(Of String, String) In _replaceDictionary
If oText.Contains(dictItem.Key) Then If oText.Contains(dictItem.Key) Then
Logger.Debug($"Replacing {dictItem.Key} with {dictItem.Value}")
oText = oText.Replace(dictItem.Key, dictItem.Value) oText = oText.Replace(dictItem.Key, dictItem.Value)
End If End If