14-08-23
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
Public Class EnvelopeDocumentElement
|
||||
Public Property Id As Integer = 0
|
||||
Public Property Id As Integer = -1
|
||||
Public Property X As Double
|
||||
Public Property Y As Double
|
||||
Public Property Width As Double
|
||||
@@ -11,5 +11,18 @@
|
||||
Public Property [ReadOnly] As Boolean = False
|
||||
Public Property Page As Integer = 1
|
||||
Public Property Status As Constants.ElementStatus = Constants.ElementStatus.Created
|
||||
Public Property AnnotationIndex As Integer
|
||||
Public Property Index As Integer = 0
|
||||
|
||||
Public ReadOnly Property Top As Single
|
||||
Get
|
||||
Return Math.Round(Y, 5)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Left As Single
|
||||
Get
|
||||
Return Math.Round(X, 5)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
@@ -19,8 +19,7 @@ Public Class ElementModel
|
||||
.Y = pRow.ItemEx("POSITION_Y", 0.0),
|
||||
.Width = pRow.ItemEx("WIDTH", 0.0),
|
||||
.Height = pRow.ItemEx("HEIGHT", 0.0),
|
||||
.Page = pRow.ItemEx("PAGE", 0),
|
||||
.AnnotationIndex = pRow.ItemEx("ANNOTATION_INDEX", 0)
|
||||
.Page = pRow.ItemEx("PAGE", 0)
|
||||
}
|
||||
End Function
|
||||
|
||||
@@ -41,7 +40,7 @@ Public Class ElementModel
|
||||
|
||||
Public Function List(pDocumentId As Integer) As List(Of EnvelopeDocumentElement)
|
||||
Try
|
||||
Dim oSql = $"SELECT * FROM [dbo].[TBSIG_DOCUMENT_RECEIVER_ELEMENT] WHERE DOCUMENT_ID = {pDocumentId} ORDER BY PAGE ASC, ANNOTATION_INDEX ASC"
|
||||
Dim oSql = $"SELECT * FROM [dbo].[TBSIG_DOCUMENT_RECEIVER_ELEMENT] WHERE DOCUMENT_ID = {pDocumentId} ORDER BY PAGE ASC"
|
||||
Dim oTable = Database.GetDatatable(oSql)
|
||||
|
||||
Return oTable?.Rows.Cast(Of DataRow).
|
||||
@@ -67,8 +66,7 @@ Public Class ElementModel
|
||||
,[REQUIRED]
|
||||
,[READ_ONLY]
|
||||
,[STATUS]
|
||||
,[PAGE]
|
||||
,[ANNOTATION_INDEX])
|
||||
,[PAGE])
|
||||
VALUES
|
||||
(@DOCUMENT_ID
|
||||
,@RECEIVER_ID
|
||||
@@ -80,8 +78,7 @@ Public Class ElementModel
|
||||
,@REQUIRED
|
||||
,@READ_ONLY
|
||||
,@STATUS
|
||||
,@PAGE
|
||||
,@INDEX)"
|
||||
,@PAGE)"
|
||||
|
||||
Dim oCommand As New SqlCommand(oSql)
|
||||
oCommand.Parameters.Add("DOCUMENT_ID", SqlDbType.NVarChar).Value = pElement.DocumentId
|
||||
@@ -95,7 +92,6 @@ Public Class ElementModel
|
||||
oCommand.Parameters.Add("READ_ONLY", SqlDbType.Bit).Value = pElement.ReadOnly
|
||||
oCommand.Parameters.Add("STATUS", SqlDbType.NVarChar).Value = pElement.Status.ToString
|
||||
oCommand.Parameters.Add("PAGE", SqlDbType.Int).Value = pElement.Page
|
||||
oCommand.Parameters.Add("INDEX", SqlDbType.Int).Value = pElement.AnnotationIndex
|
||||
|
||||
If Database.ExecuteNonQuery(oCommand) Then
|
||||
pElement.Id = GetElementId(pElement)
|
||||
|
||||
Reference in New Issue
Block a user