Compare commits
5 Commits
9b70ca8ce6
...
4335a500f1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4335a500f1 | ||
|
|
0e2c653784 | ||
|
|
92d88812e8 | ||
|
|
af60dfe338 | ||
|
|
a7fff24f80 |
@@ -22,6 +22,23 @@ Public Class EmailData
|
||||
Public Property ATT1_REL_TYPE As String = ""
|
||||
Public Property ADDED_WHO_PROCESS As String = "DDEnvelopGenerator"
|
||||
|
||||
Public ReadOnly Property EnvelopeTypeId As Integer = 0
|
||||
Public Property SignatureType As String = ""
|
||||
Public Property DocumentProcess As String = ""
|
||||
|
||||
Public Sub DynamicStringsForEmails(pEnvelope As Entities.Envelope)
|
||||
|
||||
If pEnvelope.EnvelopeTypeId = 1 Then
|
||||
SignatureType = "Signieren"
|
||||
Message = "Bitte lesen und unterzeichnen Sie dieses Dokument."
|
||||
DocumentProcess = " und elektronisch unterschreiben"
|
||||
ElseIf pEnvelope.EnvelopeTypeId = 2 Then
|
||||
SignatureType = "Lesen und bestätigen"
|
||||
Message = "Bitte bestätigen Sie, dieses Dokument gelesen zu haben."
|
||||
DocumentProcess = ""
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Constructor for sending email to receiver
|
||||
''' </summary>
|
||||
@@ -29,11 +46,14 @@ Public Class EmailData
|
||||
''' <param name="pReceiver"></param>
|
||||
''' <param name="pStatus"></param>
|
||||
Public Sub New(pEnvelope As Entities.Envelope, pReceiver As Receiver, pStatus As Constants.EnvelopeStatus)
|
||||
|
||||
DynamicStringsForEmails(pEnvelope)
|
||||
|
||||
EmailAdress = pReceiver.EmailAddress
|
||||
EmailSubject = String.Empty
|
||||
EmailType = pStatus
|
||||
|
||||
Message = TextToHtml(pEnvelope.Message)
|
||||
Message = TextToHtml(Message)
|
||||
ReferenceID = pEnvelope.Id
|
||||
ReferenceString = pEnvelope.Uuid
|
||||
ReceiverName = pReceiver.Name
|
||||
@@ -41,6 +61,9 @@ Public Class EmailData
|
||||
SenderAdress = pEnvelope.User.Email
|
||||
SenderName = pEnvelope.User.GetFullName()
|
||||
EnvelopeTitle = pEnvelope.Title
|
||||
EnvelopeTypeId = pEnvelope.EnvelopeTypeId
|
||||
SignatureType = TextToHtml(SignatureType)
|
||||
DocumentProcess = TextToHtml(DocumentProcess)
|
||||
End Sub
|
||||
Public Function TextToHtml(input As String) As String
|
||||
If String.IsNullOrEmpty(input) Then Return ""
|
||||
@@ -65,11 +88,14 @@ Public Class EmailData
|
||||
''' <param name="pEnvelope"></param>
|
||||
''' <param name="pStatus"></param>
|
||||
Public Sub New(pEnvelope As Entities.Envelope, pStatus As Constants.EnvelopeStatus)
|
||||
|
||||
DynamicStringsForEmails(pEnvelope)
|
||||
|
||||
EmailAdress = pEnvelope.User.Email
|
||||
EmailSubject = String.Empty
|
||||
EmailType = pStatus
|
||||
|
||||
Message = pEnvelope.Message
|
||||
Message = TextToHtml(Message)
|
||||
ReferenceID = pEnvelope.Id
|
||||
ReferenceString = pEnvelope.Uuid
|
||||
ReceiverName = pEnvelope.User.GetFullName()
|
||||
@@ -77,6 +103,9 @@ Public Class EmailData
|
||||
SenderAdress = pEnvelope.User.Email
|
||||
SenderName = pEnvelope.User.GetFullName()
|
||||
EnvelopeTitle = pEnvelope.Title
|
||||
EnvelopeTypeId = pEnvelope.EnvelopeTypeId
|
||||
SignatureType = TextToHtml(SignatureType)
|
||||
DocumentProcess = TextToHtml(DocumentProcess)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' indem Sie "*" wie unten gezeigt eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.0.0")>
|
||||
<Assembly: AssemblyFileVersion("2.7.0.0")>
|
||||
<Assembly: AssemblyVersion("2.7.1.0")>
|
||||
<Assembly: AssemblyFileVersion("2.7.1.0")>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.CommonServices.My.Resources
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
Imports EnvelopeGenerator.Domain.Entities
|
||||
|
||||
Public Class TemplateService
|
||||
Inherits BaseService
|
||||
@@ -24,13 +26,14 @@ Public Class TemplateService
|
||||
{"[NAME_RECEIVER]", pEmailData.ReceiverName},
|
||||
{"[NAME_SENDER]", pEmailData.SenderName},
|
||||
{"[NAME_PORTAL]", DbConfig.ExternalProgramName},
|
||||
{"[SIGNATURE_TYPE]", "signieren"},
|
||||
{"[SIGNATURE_TYPE]", pEmailData.SignatureType},
|
||||
{"[LINK_TO_DOCUMENT]", pEmailData.SignatureLink},
|
||||
{"[LINK_TO_DOCUMENT_TEXT]", $"{pEmailData.SignatureLink.Truncate(40)}.."},
|
||||
{"[DOCUMENT_TITLE]", pEmailData.EnvelopeTitle},
|
||||
{"[MESSAGE]", pEmailData.Message},
|
||||
{"[DOCUMENT_ACCESS_CODE]", pEmailData.ReceiverAccessCode},
|
||||
{"[REASON]", pReason}
|
||||
{"[REASON]", pReason},
|
||||
{"[DOCUMENT_PROCESS]", pEmailData.DocumentProcess}
|
||||
}
|
||||
End Sub
|
||||
|
||||
@@ -79,7 +82,7 @@ Public Class TemplateService
|
||||
|
||||
For Each dictItem As KeyValuePair(Of String, String) In _replaceDictionary
|
||||
If oText.Contains(dictItem.Key) Then
|
||||
|
||||
Logger.Debug($"Replacing {dictItem.Key} with {dictItem.Value}")
|
||||
oText = oText.Replace(dictItem.Key, dictItem.Value)
|
||||
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user