MS Integrating ByteData to DB for SIG Documents

This commit is contained in:
2024-06-19 11:16:32 +02:00
parent 76d4151182
commit 67a8506a37
21 changed files with 522 additions and 106 deletions

View File

@@ -24,7 +24,8 @@ Public Class DocumentModel
.Filepath = pRow.ItemEx("FILEPATH", ""),
.FileNameOriginal = pRow.ItemEx("FILENAME_ORIGINAL", ""),
.IsTempFile = False,
.Elements = ElementModel.List(oDocumentId, pReceiverId)
.Elements = ElementModel.List(oDocumentId, pReceiverId),
.Byte_Data = DirectCast(pRow.Item("BYTE_DATA"), Byte())
}
End Function
@@ -79,18 +80,21 @@ Public Class DocumentModel
([FILENAME]
,[FILENAME_ORIGINAL]
,[FILEPATH]
,[ENVELOPE_ID])
,[ENVELOPE_ID]
,[BYTE_DATA])
VALUES
(@FILENAME
,@FILENAME_ORIGINAL
,@FILEPATH
,@ENVELOPE_ID)"
,@ENVELOPE_ID
,@BYTE_DATA)"
Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("FILENAME", SqlDbType.NVarChar).Value = pDocument.Filename
oCommand.Parameters.Add("FILENAME_ORIGINAL", SqlDbType.NVarChar).Value = pDocument.FileNameOriginal
oCommand.Parameters.Add("FILEPATH", SqlDbType.NVarChar).Value = pDocument.Filepath
oCommand.Parameters.Add("ENVELOPE_ID", SqlDbType.Int).Value = pEnvelope.Id
oCommand.Parameters.Add(New SqlParameter("@BYTE_DATA", DirectCast(pDocument.Byte_Data, Object)))
If Database.ExecuteNonQuery(oCommand, pTransaction) Then
pDocument.EnvelopeId = pEnvelope.Id