33 lines
1007 B
VB.net
33 lines
1007 B
VB.net
Imports DigitalData.Modules.Base
|
|
Public Class ReceiverModel
|
|
Inherits BaseModel
|
|
|
|
Public Sub New(pState As State)
|
|
MyBase.New(pState)
|
|
End Sub
|
|
|
|
Private Function ToReceiver(pRow As DataRow) As EnvelopeReceiver
|
|
Return New EnvelopeReceiver() With {
|
|
.Id = pRow.ItemEx("GUID", 0),
|
|
.Email = pRow.ItemEx("EMAIL_ADDRESS", ""),
|
|
.Name = pRow.ItemEx("NAME", ""),
|
|
.Sequence = pRow.ItemEx("SEQUENCE", 0)
|
|
}
|
|
End Function
|
|
|
|
Public Function List(pEnvelopeId As Integer) As IEnumerable(Of EnvelopeReceiver)
|
|
Try
|
|
Dim oSql = $"SELECT * FROM [dbo].[VWSIG_ENVELOPE_RECEIVERS] WHERE ENVELOPE_ID = {pEnvelopeId}"
|
|
Dim oTable = Database.GetDatatable(oSql)
|
|
|
|
Return oTable?.Rows.Cast(Of DataRow).
|
|
Select(AddressOf ToReceiver).
|
|
ToList()
|
|
|
|
Catch ex As Exception
|
|
Logger.Error(ex)
|
|
Return Nothing
|
|
End Try
|
|
End Function
|
|
End Class
|