2023-09-20 MP
This commit is contained in:
@@ -12,6 +12,7 @@ Public MustInherit Class BaseController
|
||||
Public ElementModel As ElementModel
|
||||
Public HistoryModel As HistoryModel
|
||||
Public UserModel As UserModel
|
||||
Public EmailModel As EmailModel
|
||||
|
||||
Public ReadOnly Property Database As MSSQLServer
|
||||
Public ReadOnly Property State As State
|
||||
@@ -30,6 +31,7 @@ Public MustInherit Class BaseController
|
||||
ElementModel = New ElementModel(pState)
|
||||
HistoryModel = New HistoryModel(pState)
|
||||
UserModel = New UserModel(pState)
|
||||
EmailModel = New EmailModel(pState)
|
||||
End Sub
|
||||
|
||||
Public Function DeleteEnvelope(pEnvelope As Envelope) As Boolean
|
||||
|
||||
@@ -31,6 +31,27 @@ Public Class EnvelopeEditorController
|
||||
|
||||
#Region "Public"
|
||||
Public Function SendEnvelope() As Boolean
|
||||
Dim oResult As Boolean = True
|
||||
|
||||
For Each receiverItem As EnvelopeReceiver In Envelope.Receivers
|
||||
|
||||
' TODO Email-Template füllen
|
||||
Dim oEmailBody As String = String.Empty
|
||||
|
||||
Dim oEmailData As EmailData = New EmailData With
|
||||
{
|
||||
.EmailAdress = receiverItem.Email,
|
||||
.EmailSubject = Envelope.Subject,
|
||||
.EmailBody = oEmailBody,
|
||||
.ReferenceID = Envelope.Id
|
||||
}
|
||||
|
||||
If EmailModel.Insert(oEmailData) = False Then
|
||||
Logger.Error("EMail data could not be inserted.")
|
||||
oResult = False
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
If EnvelopeModel.Send(Envelope) Then
|
||||
@@ -141,6 +162,17 @@ Public Class EnvelopeEditorController
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function CreateThumbnail(pDocumentPath As String) As Bitmap
|
||||
Try
|
||||
Dim oThumbNail As Bitmap = Thumbnail.GetThumbnailFromPDFFile(pDocumentPath)
|
||||
|
||||
Return oThumbNail
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Overloads Function DeleteDocument(pDocument As EnvelopeDocument) As Boolean
|
||||
Dim oConnection As SqlConnection = Database.GetConnection
|
||||
Dim oTransaction As SqlTransaction = oConnection.BeginTransaction
|
||||
|
||||
Reference in New Issue
Block a user