80 lines
2.8 KiB
VB.net
80 lines
2.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 EnvelopeTypeId As Integer
|
|
Public Property ContractType As Integer
|
|
Public Property Status As Constants.EnvelopeStatus = Constants.EnvelopeStatus.EnvelopeCreated
|
|
Public Property Uuid As String = Guid.NewGuid.ToString()
|
|
Public Property UseAccessCode As Boolean = False
|
|
Public Property Language As String = "de-DE"
|
|
Public Property CertificationType As Constants.CertificationType = Constants.CertificationType.ElectronicSignature
|
|
|
|
Public Property SendReminderEmails As Boolean = False
|
|
Public Property FirstReminderDays As Integer = 0
|
|
Public Property ReminderIntervalDays As Integer = 0
|
|
|
|
Public Property ExpiresWhen As Date
|
|
Public Property ExpiresWarningWhen As Date
|
|
Public Property ExpiresWhenDays As Integer
|
|
Public Property ExpiresWarningWhenDays As Integer
|
|
|
|
Public Property FinalEmailToCreator As Constants.FinalEmailType
|
|
Public Property FinalEmailToReceivers As Constants.FinalEmailType
|
|
|
|
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 Property EnvelopeType As EnvelopeType
|
|
|
|
Public ReadOnly Property EnvelopeTypeTitle As String
|
|
Get
|
|
Return EnvelopeType?.Title
|
|
End Get
|
|
End Property
|
|
|
|
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
|
|
|
|
If Receivers.Any(Function(r) r.HasEmailAndName = False) Then
|
|
oErrors.Add(My.Resources.Envelope.Incomplete_Receivers)
|
|
End If
|
|
|
|
Return oErrors
|
|
End Function
|
|
|
|
End Class
|