This commit is contained in:
Jonathan Jenne
2023-09-20 14:07:20 +02:00
12 changed files with 119 additions and 16 deletions

View File

@@ -6,8 +6,12 @@ Imports DigitalData.Modules.Logging
Public Class EnvelopeModel
Inherits BaseModel
Private UserModel As UserModel
Public Sub New(pState As State)
MyBase.New(pState)
UserModel = New UserModel(pState)
End Sub
Private Function ToEnvelope(pRow As DataRow) As Envelope
@@ -18,12 +22,14 @@ Public Class EnvelopeModel
.Uuid = pRow.ItemEx("ENVELOPE_UUID", ""),
.Subject = pRow.ItemEx("SUBJECT", ""),
.Message = pRow.ItemEx("MESSAGE", ""),
.UserId = State.UserId,
.UserId = pRow.ItemEx("USER_ID", 0),
.Status = ObjectEx.ToEnum(Of Constants.EnvelopeStatus)(pRow.ItemEx("STATUS", "Created")),
.AddedWhen = pRow.Item("ADDED_WHEN"),
.User = New User()
}
oEnvelope.User = UserModel.SelectUser(oEnvelope.UserId)
Return oEnvelope
End Function