fix(document-model): Behandle DBNull für BYTE_DATA, um Laufzeit-Cast-Fehler zu vermeiden
This commit is contained in:
parent
3eb11311a7
commit
a5261baec5
@ -18,6 +18,7 @@ Public Class DocumentModel
|
||||
|
||||
Private Function ToDocument(pRow As DataRow, pReceiverId As Integer) As EnvelopeDocument
|
||||
Dim oDocumentId = pRow.ItemEx("GUID", 0)
|
||||
Dim byteDataObj = pRow.Item("BYTE_DATA")
|
||||
Return New EnvelopeDocument() With {
|
||||
.Id = oDocumentId,
|
||||
.EnvelopeId = pRow.ItemEx("ENVELOPE_ID", 0),
|
||||
@ -26,7 +27,7 @@ Public Class DocumentModel
|
||||
.FileNameOriginal = pRow.ItemEx("FILENAME_ORIGINAL", ""),
|
||||
.IsTempFile = False,
|
||||
.Elements = ElementModel.List(oDocumentId, pReceiverId),
|
||||
.ByteData = DirectCast(pRow.Item("BYTE_DATA"), Byte())
|
||||
.ByteData = If(byteDataObj Is DBNull.Value, Nothing, DirectCast(byteDataObj, Byte()))
|
||||
}
|
||||
End Function
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user