29-11-2023
This commit is contained in:
@@ -4,6 +4,7 @@ Public Class EmailTemplate
|
||||
Private _DocumentReceivedBodyTemplate As List(Of String)
|
||||
Private _DocumentSignedBodyTemplate As List(Of String)
|
||||
Private _DocumentCompletedBodyTemplate As List(Of String)
|
||||
Private _DocumentDeletedBodyTemplate As List(Of String)
|
||||
|
||||
Private _replaceDictionary As Dictionary(Of String, String)
|
||||
|
||||
@@ -34,6 +35,15 @@ Public Class EmailTemplate
|
||||
"<NAME_SENDER>"
|
||||
}
|
||||
|
||||
_DocumentDeletedBodyTemplate = New List(Of String) From {
|
||||
"Guten Tag, <NAME_RECEIVER>",
|
||||
"",
|
||||
"Der User <NAME_SENDER> hat den Umschlag <DOCUMENT_TITLE> gelöscht.",
|
||||
"",
|
||||
"Mit freundlichen Grüßen",
|
||||
"<NAME_SENDER>"
|
||||
}
|
||||
|
||||
_DocumentCompletedBodyTemplate = New List(Of String) From {
|
||||
"Guten Tag, <NAME_RECEIVER>",
|
||||
"",
|
||||
@@ -60,6 +70,10 @@ Public Class EmailTemplate
|
||||
FillEmailBody(pEmailData, _DocumentReceivedBodyTemplate)
|
||||
End Sub
|
||||
|
||||
Public Sub FillEnvelopeDeletedEmailBody(pEmailData As EmailData)
|
||||
FillEmailBody(pEmailData, _DocumentDeletedBodyTemplate)
|
||||
End Sub
|
||||
|
||||
Public Sub FillDocumentSignedEmailBody(pEmailData As EmailData)
|
||||
FillEmailBody(pEmailData, _DocumentSignedBodyTemplate)
|
||||
End Sub
|
||||
|
||||
@@ -29,33 +29,7 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Function Validate() As List(Of String)
|
||||
Dim oErrors As New List(Of String)
|
||||
|
||||
If String.IsNullOrWhiteSpace(Subject) Then
|
||||
oErrors.Add(My.Resources.Envelope.Missing_Subject)
|
||||
End If
|
||||
|
||||
If String.IsNullOrWhiteSpace(Message) Then
|
||||
oErrors.Add(My.Resources.Envelope.Missing_Message)
|
||||
End If
|
||||
|
||||
If Documents.Count = 0 Then
|
||||
oErrors.Add(My.Resources.Envelope.Missing_Documents)
|
||||
End If
|
||||
|
||||
If Receivers.Count = 0 Then
|
||||
oErrors.Add(My.Resources.Envelope.Missing_Receivers)
|
||||
End If
|
||||
|
||||
For Each Receiver In Receivers
|
||||
If IsValidEmailAddress(Receiver.Email) = False Then
|
||||
oErrors.Add(String.Format(My.Resources.Envelope.Invalid_Email_Address, Receiver.Name))
|
||||
End If
|
||||
Next
|
||||
|
||||
Return oErrors
|
||||
End Function
|
||||
|
||||
Public Function ValidateReceiverDocumentData() As List(Of String)
|
||||
Dim oErrors As New List(Of String)
|
||||
@@ -72,12 +46,5 @@
|
||||
End Function
|
||||
|
||||
|
||||
Private Function IsValidEmailAddress(pEmailAddress As String) As Boolean
|
||||
Try
|
||||
Dim oAddress = New System.Net.Mail.MailAddress(pEmailAddress)
|
||||
Return oAddress.Address = pEmailAddress
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Public Class EnvelopeHistoryEntry
|
||||
Public EnvelopeId As Integer
|
||||
Public UserReference As String
|
||||
Public ActionType As Constants.EnvelopeHistoryActionType
|
||||
Public ActionDate As Date
|
||||
Public Status As Constants.EnvelopeStatus
|
||||
Public ActionDate As Date = Now()
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user