refactor(EnvelopeDocument): Aktualisiert, um Comon.Entities.EnvelopeDocument zu enthalten
This commit is contained in:
@@ -10,14 +10,11 @@ Public Class EnvelopeDocument
|
|||||||
|
|
||||||
Public Property EnvelopeId As Integer = 0
|
Public Property EnvelopeId As Integer = 0
|
||||||
|
|
||||||
Public Property Thumbnail As Bitmap
|
|
||||||
|
|
||||||
Public Property Elements As New List(Of EnvelopeDocumentElement)
|
Public Property Elements As New List(Of EnvelopeDocumentElement)
|
||||||
|
|
||||||
Public Property Filename As String
|
Public Property Filename As String
|
||||||
|
|
||||||
Public Property Filepath As String
|
Public Property Filepath As String
|
||||||
|
|
||||||
Public Property PageCount As Integer
|
Public Property ByteData As Byte()
|
||||||
Public Property Byte_Data As Byte()
|
|
||||||
End Class
|
End Class
|
||||||
@@ -26,7 +26,7 @@ Public Class DocumentModel
|
|||||||
.FileNameOriginal = pRow.ItemEx("FILENAME_ORIGINAL", ""),
|
.FileNameOriginal = pRow.ItemEx("FILENAME_ORIGINAL", ""),
|
||||||
.IsTempFile = False,
|
.IsTempFile = False,
|
||||||
.Elements = ElementModel.List(oDocumentId, pReceiverId),
|
.Elements = ElementModel.List(oDocumentId, pReceiverId),
|
||||||
.Byte_Data = DirectCast(pRow.Item("BYTE_DATA"), Byte())
|
.ByteData = DirectCast(pRow.Item("BYTE_DATA"), Byte())
|
||||||
}
|
}
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ Public Class DocumentModel
|
|||||||
oCommand.Parameters.Add("FILENAME_ORIGINAL", SqlDbType.NVarChar).Value = pDocument.FileNameOriginal
|
oCommand.Parameters.Add("FILENAME_ORIGINAL", SqlDbType.NVarChar).Value = pDocument.FileNameOriginal
|
||||||
oCommand.Parameters.Add("FILEPATH", SqlDbType.NVarChar).Value = pDocument.Filepath
|
oCommand.Parameters.Add("FILEPATH", SqlDbType.NVarChar).Value = pDocument.Filepath
|
||||||
oCommand.Parameters.Add("ENVELOPE_ID", SqlDbType.Int).Value = pEnvelope.Id
|
oCommand.Parameters.Add("ENVELOPE_ID", SqlDbType.Int).Value = pEnvelope.Id
|
||||||
oCommand.Parameters.Add(New SqlParameter("@BYTE_DATA", DirectCast(pDocument.Byte_Data, Object)))
|
oCommand.Parameters.Add(New SqlParameter("@BYTE_DATA", DirectCast(pDocument.ByteData, Object)))
|
||||||
|
|
||||||
If Database.ExecuteNonQuery(oCommand, pTransaction) Then
|
If Database.ExecuteNonQuery(oCommand, pTransaction) Then
|
||||||
pDocument.EnvelopeId = pEnvelope.Id
|
pDocument.EnvelopeId = pEnvelope.Id
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ENVELOPE_ID")]
|
[Column("ENVELOPE_ID")]
|
||||||
public int EnvelopeId { get; set; }
|
public int EnvelopeId { get; set; } = 0;
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
@@ -26,6 +26,18 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
||||||
public byte[] ByteData { get; set; }
|
public byte[] ByteData { get; set; }
|
||||||
|
|
||||||
public IEnumerable<DocumentReceiverElement> Elements { get; set; }
|
// TODO: * Check the Form App and remove the default value
|
||||||
|
public IEnumerable<DocumentReceiverElement> Elements { get; set; } = new List<DocumentReceiverElement>();
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public string FileNameOriginal { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public bool IsTempFile { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public string Filename { get; set; }
|
||||||
|
|
||||||
|
public string Filepath { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user