Public Class Envelope Public Property Id As Integer = 0 Public Property Subject As String Public Property Message As String Public Property UserId As Integer Public Property Uuid As String = Guid.NewGuid.ToString() Public Property Status As Constants.EnvelopeStatus = Constants.EnvelopeStatus.Created Public Property Documents As New List(Of EnvelopeFile) Public Property Receivers As New List(Of Receiver) Public Sub New(pSubject As String, pMessage As String, pUserId As Integer) Subject = pSubject Message = pMessage UserId = pUserId End Sub Public Function Validate() As List(Of String) Dim oErrors As New List(Of String) If String.IsNullOrWhiteSpace(Subject) Then oErrors.Add(My.Resources.Envelope.Missing_Subject) End If If String.IsNullOrWhiteSpace(Message) Then oErrors.Add(My.Resources.Envelope.Missing_Message) End If 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