2023-12-05 15:40:16 +01:00

54 lines
1.8 KiB
VB.net

Public Class Envelope
Public Property Id As Integer = 0
Public Property UserId As Integer
Public Property Title As String = ""
Public Property ContractType As Constants.ContractType
Public Property Status As Constants.EnvelopeStatus
Public Property Uuid As String = Guid.NewGuid.ToString()
Public Property Subject As String = My.Resources.Envelope.You_received_a_document_to_sign_
Public Property Message As String = My.Resources.Envelope.Please_read_and_sign_this_document
Public Property AddedWhen As Date
Public Property User As New User()
Public Property Documents As New List(Of EnvelopeDocument)
Public Property Receivers As New List(Of EnvelopeReceiver)
Public Property History As New List(Of EnvelopeHistoryEntry)
Public ReadOnly Property IsAlreadySent As Boolean
Get
Return Status > Constants.EnvelopeStatus.EnvelopeSaved
End Get
End Property
Public ReadOnly Property StatusTranslated As String
Get
Dim oStatus = Status.ToString()
Return My.Resources.Model.ResourceManager.GetString(oStatus)
End Get
End Property
Public ReadOnly Property ContractTypeTranslated As String
Get
Dim oContractType = ContractType.ToString()
Return My.Resources.Model.ResourceManager.GetString(oContractType)
End Get
End Property
Public Function ValidateReceiverDocumentData() As List(Of String)
Dim oErrors As New List(Of String)
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
Return oErrors
End Function
End Class