refactor(DocResult): remove framework condition_

This commit is contained in:
tekh 2025-08-20 17:43:30 +02:00
parent e64ac4b5e7
commit 419f421d52
4 changed files with 13 additions and 7 deletions

View File

@ -217,7 +217,7 @@ Namespace Jobs
If Not IsNothing(imageData) Then If Not IsNothing(imageData) Then
sFileName = System.IO.Path.GetFileName(pFilePath) sFileName = System.IO.Path.GetFileName(pFilePath)
'Set insert query 'Set insert query
qry = $"UPDATE TBSIG_ENVELOPE SET DOC_RESULT = @ImageData WHERE GUID = {pEnvelopeID}" qry = $"UPDATE TBSIG_ENVELOPE SET DocResult = @ImageData WHERE GUID = {pEnvelopeID}"
'Initialize SqlCommand object for insert. 'Initialize SqlCommand object for insert.
SqlCom = New SqlCommand(qry, Database.GetConnection) SqlCom = New SqlCommand(qry, Database.GetConnection)
'We are passing File Name and Image byte data as sql parameters. 'We are passing File Name and Image byte data as sql parameters.

View File

@ -55,10 +55,10 @@ Public Class EnvelopeModel
If Not IsDBNull(oDOC_RESULT) Then If Not IsDBNull(oDOC_RESULT) Then
Dim oByte As Byte() = DirectCast(pRow.Item("DOC_RESULT"), Byte()) Dim oByte As Byte() = DirectCast(pRow.Item("DOC_RESULT"), Byte())
If Not IsNothing(oByte) Then If Not IsNothing(oByte) Then
oEnvelope.DOC_RESULT = oByte oEnvelope.DocResult = oByte
End If End If
Else Else
oEnvelope.DOC_RESULT = Nothing oEnvelope.DocResult = Nothing
End If End If
oEnvelope.User = UserModel.SelectUser(oEnvelope.UserId) oEnvelope.User = UserModel.SelectUser(oEnvelope.UserId)
oEnvelope.Receivers = ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id) oEnvelope.Receivers = ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id)

View File

@ -131,6 +131,15 @@ public class Envelope
= false; = false;
#endif #endif
[NotMapped]
[Column("DOC_RESULT")]
public byte[]
#if NET
?
#endif
DocResult
{ get; set; }
[ForeignKey("EnvelopeTypeId")] [ForeignKey("EnvelopeTypeId")]
public virtual EnvelopeType public virtual EnvelopeType
#if NET #if NET
@ -144,9 +153,6 @@ public class Envelope
[NotMapped] [NotMapped]
public bool IsAlreadySent => Status > (int)Constants.EnvelopeStatus.EnvelopeSaved; public bool IsAlreadySent => Status > (int)Constants.EnvelopeStatus.EnvelopeSaved;
[NotMapped]
public byte[] DOC_RESULT { get; set; }
#endif #endif
public List<EnvelopeDocument> Documents { get; set; } public List<EnvelopeDocument> Documents { get; set; }

View File

@ -448,7 +448,7 @@ Public Class frmMain
'For Document 'For Document
Try Try
'Get image data from gridview column. 'Get image data from gridview column.
strSql = "Select [DOC_RESULT] from [TBSIG_ENVELOPE] WHERE GUID = " & pEnvID strSql = "Select [DocResult] from [TBSIG_ENVELOPE] WHERE GUID = " & pEnvID
Dim obyteDB = DB_DD_ECM.GetScalarValue(strSql) Dim obyteDB = DB_DD_ECM.GetScalarValue(strSql)
If Not IsDBNull(obyteDB) Then If Not IsDBNull(obyteDB) Then
'Get image data from DB 'Get image data from DB