refactor(EnvelopeDocument): rename as Document
This commit is contained in:
@@ -100,7 +100,7 @@ Public MustInherit Class BaseController
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function DeleteDocument(pDocument As EnvelopeDocument, pTransaction As SqlTransaction) As Boolean
|
||||
Public Function DeleteDocument(pDocument As Document, pTransaction As SqlTransaction) As Boolean
|
||||
Try
|
||||
|
||||
If DocumentModel.Delete(pDocument.Id, pTransaction) = True Then
|
||||
@@ -137,7 +137,7 @@ Public MustInherit Class BaseController
|
||||
|
||||
End Function
|
||||
|
||||
Public Function DeleteDocumentFromDisk(pDocument As EnvelopeDocument) As Boolean
|
||||
Public Function DeleteDocumentFromDisk(pDocument As Document) As Boolean
|
||||
Try
|
||||
If IO.File.Exists(pDocument.Filepath) Then
|
||||
IO.File.Delete(pDocument.Filepath)
|
||||
|
||||
@@ -159,7 +159,7 @@ Public Class EnvelopeEditorController
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Async Function CreateDocument(pDocumentFilePath As String) As Threading.Tasks.Task(Of EnvelopeDocument)
|
||||
Public Async Function CreateDocument(pDocumentFilePath As String) As Threading.Tasks.Task(Of Document)
|
||||
Try
|
||||
Dim oFixedPath = FixPageRotation.FixPageRotation(pDocumentFilePath)
|
||||
If oFixedPath <> pDocumentFilePath Then
|
||||
@@ -177,7 +177,7 @@ Public Class EnvelopeEditorController
|
||||
|
||||
Dim oFileInfoTemp = New FileInfo(oTempFilePath)
|
||||
|
||||
Dim oDocument = New EnvelopeDocument() With {
|
||||
Dim oDocument = New Document() With {
|
||||
.Filename = oFileInfoTemp.Name,
|
||||
.Filepath = oFileInfoTemp.FullName,
|
||||
.FileNameOriginal = oFileInfo.Name,
|
||||
@@ -230,7 +230,7 @@ Public Class EnvelopeEditorController
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Overloads Function DeleteDocument(pDocument As EnvelopeDocument) As Boolean
|
||||
Public Overloads Function DeleteDocument(pDocument As Document) As Boolean
|
||||
Dim oConnection As SqlConnection = Database.GetConnection
|
||||
Dim oTransaction As SqlTransaction = oConnection.BeginTransaction
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Imports EnvelopeGenerator.Domain.Entities
|
||||
Public Class FieldEditorController
|
||||
Inherits BaseController
|
||||
|
||||
Private ReadOnly Document As EnvelopeDocument
|
||||
Private ReadOnly Document As Document
|
||||
Public Property Elements As New List(Of DocumentReceiverElement)
|
||||
|
||||
Public Class ElementInfo
|
||||
@@ -16,7 +16,7 @@ Public Class FieldEditorController
|
||||
Public Guid As Integer
|
||||
End Class
|
||||
|
||||
Public Sub New(pState As State, pDocument As EnvelopeDocument)
|
||||
Public Sub New(pState As State, pDocument As Document)
|
||||
MyBase.New(pState)
|
||||
Document = pDocument
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Imports EnvelopeGenerator.Domain.Entities
|
||||
|
||||
Partial Public Class frmEnvelopeEditor
|
||||
Public Property Envelope As Envelope
|
||||
Public Property Documents As New BindingList(Of EnvelopeDocument)
|
||||
Public Property Documents As New BindingList(Of Document)
|
||||
Public Property Receivers As New BindingList(Of ReceiverVM)
|
||||
|
||||
Private AllReceiverEmails As New List(Of String)
|
||||
@@ -104,10 +104,10 @@ Partial Public Class frmEnvelopeEditor
|
||||
End If
|
||||
Else
|
||||
Controller = New EnvelopeEditorController(State, Envelope)
|
||||
Documents = New BindingList(Of EnvelopeDocument)(Controller.Envelope.Documents)
|
||||
Documents = New BindingList(Of Document)(Controller.Envelope.Documents)
|
||||
Receivers = New BindingList(Of ReceiverVM)(Controller.Envelope.EnvelopeReceivers.Select(Function(r) ReceiverVM.From(r)).ToList())
|
||||
|
||||
For Each docItem As EnvelopeDocument In Documents
|
||||
For Each docItem As Document In Documents
|
||||
If Not File.Exists(docItem.Filepath) Then
|
||||
Dim oTempFolder = TempFiles._TempPath
|
||||
Dim oTempFilename = String.Concat(oTempFolder, "\", $"ViewEnvDoc_{Envelope.Id}.pdf")
|
||||
@@ -183,7 +183,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oDocument As EnvelopeDocument = DirectCast(ViewDocuments.GetFocusedRow(), EnvelopeDocument)
|
||||
Dim oDocument As Document = DirectCast(ViewDocuments.GetFocusedRow(), Document)
|
||||
If Controller.DeleteDocument(oDocument) Then
|
||||
Documents.Remove(oDocument)
|
||||
GridDocuments.DataSource = Nothing
|
||||
@@ -213,7 +213,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
End If
|
||||
|
||||
If ViewDocuments.GetSelectedRows().Count > 0 Then
|
||||
Dim oDocument As EnvelopeDocument = DirectCast(ViewDocuments.GetFocusedRow(), EnvelopeDocument)
|
||||
Dim oDocument As Document = DirectCast(ViewDocuments.GetFocusedRow(), Document)
|
||||
Dim oEnvelope = Controller.Envelope
|
||||
If Not IsNothing(oDocument.ByteData) Then
|
||||
Dim oTempFolder = TempFiles._TempPath
|
||||
|
||||
@@ -18,7 +18,7 @@ Partial Public Class frmFieldEditor
|
||||
Private Manager As AnnotationManager
|
||||
Private Controller As FieldEditorController
|
||||
|
||||
Public Property Document As EnvelopeDocument = Nothing
|
||||
Public Property Document As Document = Nothing
|
||||
Public Property Receivers As List(Of ReceiverVM)
|
||||
Public Property SelectedReceiver As ReceiverVM = Nothing
|
||||
|
||||
|
||||
@@ -623,7 +623,7 @@ Public Class frmMain
|
||||
Dim oEnvelope As Envelope = ViewEnvelopes.GetRow(ViewEnvelopes.FocusedRowHandle)
|
||||
|
||||
Dim oController = New EnvelopeEditorController(State, oEnvelope)
|
||||
Dim Documents As New BindingList(Of EnvelopeDocument)
|
||||
Dim Documents As New BindingList(Of Document)
|
||||
Dim Receivers = New BindingList(Of ReceiverVM)(oController.Envelope.EnvelopeReceivers.Select(Function(r) ReceiverVM.From(r)).ToList())
|
||||
For Each oReceiver As ReceiverVM In Receivers
|
||||
If oReceiver.EmailAddress = selReceiver.EmailAddress Then
|
||||
@@ -871,7 +871,7 @@ Public Class frmMain
|
||||
Dim oEnvelope As Envelope = ViewEnvelopes.GetRow(ViewEnvelopes.FocusedRowHandle)
|
||||
If oEnvelope.UseAccessCode = True Then
|
||||
Dim oController = New EnvelopeEditorController(State, oEnvelope)
|
||||
Dim Documents As New BindingList(Of EnvelopeDocument)
|
||||
Dim Documents As New BindingList(Of Document)
|
||||
Dim Receivers = New BindingList(Of ReceiverVM)(oController.Envelope.EnvelopeReceivers.Select(Function(r) ReceiverVM.From(r)).ToList())
|
||||
For Each oReceiver As ReceiverVM In Receivers
|
||||
If oReceiver.EmailAddress = selReceiver.EmailAddress Then
|
||||
|
||||
Reference in New Issue
Block a user