rename Entities.Signature as DocReceiverElement

This commit is contained in:
2026-06-09 22:52:41 +02:00
parent d59aa6157d
commit cb6dea319b
16 changed files with 40 additions and 40 deletions

View File

@@ -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)