19.07.2023

This commit is contained in:
Jonathan Jenne
2023-07-31 09:52:49 +02:00
parent 9a3c3c2706
commit b24fbf58fc
18 changed files with 379 additions and 104 deletions

View File

@@ -11,21 +11,42 @@ Public Class EnvelopeEditorController
Private ReadOnly Database As MSSQLServer
Private ReadOnly State As State = Nothing
Private ReadOnly EnvelopeModel As EnvelopeModel
Private ReadOnly DocumentModel As DocumentModel
Private ReadOnly ReceiverModel As ReceiverModel
Public ReadOnly Envelope As Envelope = Nothing
Public Sub New(pState As State)
MyBase.New(pState.LogConfig)
Database = pState.Database
State = pState
EnvelopeModel = New EnvelopeModel(pState)
Envelope = CreateEnvelope()
End Sub
Public Sub New(pState As State, pEnvelope As Envelope)
MyBase.New(pState.LogConfig)
Database = pState.Database
State = pState
EnvelopeModel = New EnvelopeModel(pState)
DocumentModel = New DocumentModel(pState)
ReceiverModel = New ReceiverModel(pState)
Envelope = pEnvelope
Envelope.Documents = DocumentModel.List(pEnvelope.Id)
Envelope.Receivers = ReceiverModel.List(pEnvelope.Id)
End Sub
#Region "Public"
Public Function CreateEnvelope() As Envelope
Dim oEnvelope As New Envelope(State.UserId)
Dim oEnvelope As New Envelope() With {.UserId = State.UserId}
If EnvelopeModel.Insert(oEnvelope) Then
Return oEnvelope
Else