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 ATT1_REL_TYPE As String = ""
|
||||||
Public Property ADDED_WHO_PROCESS As String = "DDEnvelopGenerator"
|
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>
|
''' <summary>
|
||||||
''' Constructor for sending email to receiver
|
''' Constructor for sending email to receiver
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@@ -29,11 +46,14 @@ Public Class EmailData
|
|||||||
''' <param name="pReceiver"></param>
|
''' <param name="pReceiver"></param>
|
||||||
''' <param name="pStatus"></param>
|
''' <param name="pStatus"></param>
|
||||||
Public Sub New(pEnvelope As Entities.Envelope, pReceiver As Receiver, pStatus As Constants.EnvelopeStatus)
|
Public Sub New(pEnvelope As Entities.Envelope, pReceiver As Receiver, pStatus As Constants.EnvelopeStatus)
|
||||||
|
|
||||||
|
DynamicStringsForEmails(pEnvelope)
|
||||||
|
|
||||||
EmailAdress = pReceiver.EmailAddress
|
EmailAdress = pReceiver.EmailAddress
|
||||||
EmailSubject = String.Empty
|
EmailSubject = String.Empty
|
||||||
EmailType = pStatus
|
EmailType = pStatus
|
||||||
|
|
||||||
Message = TextToHtml(pEnvelope.Message)
|
Message = TextToHtml(Message)
|
||||||
ReferenceID = pEnvelope.Id
|
ReferenceID = pEnvelope.Id
|
||||||
ReferenceString = pEnvelope.Uuid
|
ReferenceString = pEnvelope.Uuid
|
||||||
ReceiverName = pReceiver.Name
|
ReceiverName = pReceiver.Name
|
||||||
@@ -41,6 +61,9 @@ Public Class EmailData
|
|||||||
SenderAdress = pEnvelope.User.Email
|
SenderAdress = pEnvelope.User.Email
|
||||||
SenderName = pEnvelope.User.GetFullName()
|
SenderName = pEnvelope.User.GetFullName()
|
||||||
EnvelopeTitle = pEnvelope.Title
|
EnvelopeTitle = pEnvelope.Title
|
||||||
|
EnvelopeTypeId = pEnvelope.EnvelopeTypeId
|
||||||
|
SignatureType = TextToHtml(SignatureType)
|
||||||
|
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 ""
|
||||||
@@ -65,11 +88,14 @@ Public Class EmailData
|
|||||||
''' <param name="pEnvelope"></param>
|
''' <param name="pEnvelope"></param>
|
||||||
''' <param name="pStatus"></param>
|
''' <param name="pStatus"></param>
|
||||||
Public Sub New(pEnvelope As Entities.Envelope, pStatus As Constants.EnvelopeStatus)
|
Public Sub New(pEnvelope As Entities.Envelope, pStatus As Constants.EnvelopeStatus)
|
||||||
|
|
||||||
|
DynamicStringsForEmails(pEnvelope)
|
||||||
|
|
||||||
EmailAdress = pEnvelope.User.Email
|
EmailAdress = pEnvelope.User.Email
|
||||||
EmailSubject = String.Empty
|
EmailSubject = String.Empty
|
||||||
EmailType = pStatus
|
EmailType = pStatus
|
||||||
|
|
||||||
Message = pEnvelope.Message
|
Message = TextToHtml(Message)
|
||||||
ReferenceID = pEnvelope.Id
|
ReferenceID = pEnvelope.Id
|
||||||
ReferenceString = pEnvelope.Uuid
|
ReferenceString = pEnvelope.Uuid
|
||||||
ReceiverName = pEnvelope.User.GetFullName()
|
ReceiverName = pEnvelope.User.GetFullName()
|
||||||
@@ -77,6 +103,9 @@ Public Class EmailData
|
|||||||
SenderAdress = pEnvelope.User.Email
|
SenderAdress = pEnvelope.User.Email
|
||||||
SenderName = pEnvelope.User.GetFullName()
|
SenderName = pEnvelope.User.GetFullName()
|
||||||
EnvelopeTitle = pEnvelope.Title
|
EnvelopeTitle = pEnvelope.Title
|
||||||
|
EnvelopeTypeId = pEnvelope.EnvelopeTypeId
|
||||||
|
SignatureType = TextToHtml(SignatureType)
|
||||||
|
DocumentProcess = TextToHtml(DocumentProcess)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -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")>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
|
Imports EnvelopeGenerator.CommonServices.My.Resources
|
||||||
Imports EnvelopeGenerator.Domain.Constants
|
Imports EnvelopeGenerator.Domain.Constants
|
||||||
|
Imports EnvelopeGenerator.Domain.Entities
|
||||||
|
|
||||||
Public Class TemplateService
|
Public Class TemplateService
|
||||||
Inherits BaseService
|
Inherits BaseService
|
||||||
@@ -24,13 +26,14 @@ Public Class TemplateService
|
|||||||
{"[NAME_RECEIVER]", pEmailData.ReceiverName},
|
{"[NAME_RECEIVER]", pEmailData.ReceiverName},
|
||||||
{"[NAME_SENDER]", pEmailData.SenderName},
|
{"[NAME_SENDER]", pEmailData.SenderName},
|
||||||
{"[NAME_PORTAL]", DbConfig.ExternalProgramName},
|
{"[NAME_PORTAL]", DbConfig.ExternalProgramName},
|
||||||
{"[SIGNATURE_TYPE]", "signieren"},
|
{"[SIGNATURE_TYPE]", pEmailData.SignatureType},
|
||||||
{"[LINK_TO_DOCUMENT]", pEmailData.SignatureLink},
|
{"[LINK_TO_DOCUMENT]", pEmailData.SignatureLink},
|
||||||
{"[LINK_TO_DOCUMENT_TEXT]", $"{pEmailData.SignatureLink.Truncate(40)}.."},
|
{"[LINK_TO_DOCUMENT_TEXT]", $"{pEmailData.SignatureLink.Truncate(40)}.."},
|
||||||
{"[DOCUMENT_TITLE]", pEmailData.EnvelopeTitle},
|
{"[DOCUMENT_TITLE]", pEmailData.EnvelopeTitle},
|
||||||
{"[MESSAGE]", pEmailData.Message},
|
{"[MESSAGE]", pEmailData.Message},
|
||||||
{"[DOCUMENT_ACCESS_CODE]", pEmailData.ReceiverAccessCode},
|
{"[DOCUMENT_ACCESS_CODE]", pEmailData.ReceiverAccessCode},
|
||||||
{"[REASON]", pReason}
|
{"[REASON]", pReason},
|
||||||
|
{"[DOCUMENT_PROCESS]", pEmailData.DocumentProcess}
|
||||||
}
|
}
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -79,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
|
||||||
|
|||||||
Reference in New Issue
Block a user