2023-09-20

This commit is contained in:
2023-09-20 13:46:34 +02:00
parent 12556e41e4
commit 510813b06a
12 changed files with 119 additions and 16 deletions

View File

@@ -5,8 +5,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
@@ -17,12 +21,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