rename Entities.Signature as DocReceiverElement
This commit is contained in:
@@ -46,7 +46,7 @@ Namespace Jobs.FinalizeDocument
|
||||
Return pSourceBuffer
|
||||
End If
|
||||
|
||||
Dim sigRepo = scope.ServiceProvider.Repository(Of Signature)()
|
||||
Dim sigRepo = scope.ServiceProvider.Repository(Of DocReceiverElement)()
|
||||
Dim elements = sigRepo _
|
||||
.Where(Function(sig) sig.Document.EnvelopeId = envelopeId) _
|
||||
.Include(Function(sig) sig.Annotations) _
|
||||
@@ -58,7 +58,7 @@ Namespace Jobs.FinalizeDocument
|
||||
End Using
|
||||
End Function
|
||||
|
||||
Public Function BurnElementAnnotsToPDF(pSourceBuffer As Byte(), elements As List(Of Signature)) As Byte()
|
||||
Public Function BurnElementAnnotsToPDF(pSourceBuffer As Byte(), elements As List(Of DocReceiverElement)) As Byte()
|
||||
' Add background
|
||||
Using doc As Pdf(Of MemoryStream, MemoryStream) = Pdf.FromMemory(pSourceBuffer)
|
||||
'TODO: take the length from the largest y
|
||||
|
||||
@@ -10,8 +10,8 @@ Public Class ElementModel
|
||||
MyBase.New(pState)
|
||||
End Sub
|
||||
|
||||
Private Function ToElement(pRow As DataRow) As Signature
|
||||
Return New Signature() With {
|
||||
Private Function ToElement(pRow As DataRow) As DocReceiverElement
|
||||
Return New DocReceiverElement() With {
|
||||
.Id = pRow.ItemEx("GUID", 0),
|
||||
.DocumentId = pRow.ItemEx("DOCUMENT_ID", 0),
|
||||
.ReceiverId = pRow.ItemEx("RECEIVER_ID", 0),
|
||||
@@ -24,7 +24,7 @@ Public Class ElementModel
|
||||
}
|
||||
End Function
|
||||
|
||||
Private Function ToElements(pTable As DataTable) As List(Of Signature)
|
||||
Private Function ToElements(pTable As DataTable) As List(Of DocReceiverElement)
|
||||
Return pTable?.Rows.Cast(Of DataRow).
|
||||
Select(AddressOf ToElement).
|
||||
ToList()
|
||||
@@ -80,7 +80,7 @@ Public Class ElementModel
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function List(pDocumentId As Integer) As List(Of Signature)
|
||||
Public Function List(pDocumentId As Integer) As List(Of DocReceiverElement)
|
||||
Try
|
||||
Dim oSql = $"SELECT * FROM [dbo].[TBSIG_DOCUMENT_RECEIVER_ELEMENT] WHERE DOCUMENT_ID = {pDocumentId} ORDER BY PAGE ASC"
|
||||
Dim oTable = Database.GetDatatable(oSql)
|
||||
@@ -93,7 +93,7 @@ Public Class ElementModel
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function List(pDocumentId As Integer, pReceiverId As Integer) As List(Of Signature)
|
||||
Public Function List(pDocumentId As Integer, pReceiverId As Integer) As List(Of DocReceiverElement)
|
||||
Try
|
||||
Dim oReceiverConstraint = ""
|
||||
If pReceiverId > 0 Then
|
||||
@@ -111,7 +111,7 @@ Public Class ElementModel
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Insert(pElement As Signature) As Boolean
|
||||
Public Function Insert(pElement As DocReceiverElement) As Boolean
|
||||
Try
|
||||
Dim oSql = "INSERT INTO [dbo].[TBSIG_DOCUMENT_RECEIVER_ELEMENT]
|
||||
([DOCUMENT_ID]
|
||||
@@ -161,7 +161,7 @@ Public Class ElementModel
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Update(pElement As Signature) As Boolean
|
||||
Public Function Update(pElement As DocReceiverElement) As Boolean
|
||||
Try
|
||||
Dim oSql = "UPDATE [dbo].[TBSIG_DOCUMENT_RECEIVER_ELEMENT]
|
||||
SET [POSITION_X] = @POSITION_X
|
||||
@@ -185,7 +185,7 @@ Public Class ElementModel
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function GetElementId(pElement As Signature) As Integer
|
||||
Private Function GetElementId(pElement As DocReceiverElement) As Integer
|
||||
Try
|
||||
Return Database.GetScalarValue($"SELECT MAX(GUID) FROM TBSIG_DOCUMENT_RECEIVER_ELEMENT
|
||||
WHERE DOCUMENT_ID = {pElement.DocumentId} AND RECEIVER_ID = {pElement.ReceiverId}")
|
||||
@@ -196,7 +196,7 @@ Public Class ElementModel
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function DeleteElement(pElement As Signature) As Boolean
|
||||
Public Function DeleteElement(pElement As DocReceiverElement) As Boolean
|
||||
Try
|
||||
Dim oSql = $"DELETE FROM TBSIG_DOCUMENT_RECEIVER_ELEMENT WHERE GUID = {pElement.Id}"
|
||||
Return Database.ExecuteNonQuery(oSql)
|
||||
|
||||
Reference in New Issue
Block a user