Update Status Enums

This commit is contained in:
Jonathan Jenne
2023-11-06 11:37:44 +01:00
parent 74caa3e3c7
commit b480100f4d
8 changed files with 16 additions and 16 deletions

View File

@@ -4,7 +4,7 @@
Public Property Y As Double
Public Property Width As Double
Public Property Height As Double
Public Property ElementType As String
Public Property ElementType As Constants.ElementType
Public Property DocumentId As Integer
Public Property ReceiverId As Integer
Public Property Required As Boolean = False

View File

@@ -35,7 +35,7 @@ Public Class CertificateModel
oCommand.Parameters.Add("CREATOR_ID", SqlDbType.Int).Value = pEnvelope.UserId
oCommand.Parameters.Add("CREATOR_NAME", SqlDbType.NVarChar).Value = pEnvelope.User.FullName
oCommand.Parameters.Add("CREATOR_EMAIL", SqlDbType.NVarChar).Value = pEnvelope.User.Email
oCommand.Parameters.Add("ENVELOPE_STATUS", SqlDbType.NVarChar).Value = pEnvelope.Status
oCommand.Parameters.Add("ENVELOPE_STATUS", SqlDbType.Int).Value = pEnvelope.Status
If Database.ExecuteNonQuery(oCommand) Then
Return True

View File

@@ -33,7 +33,7 @@ Public Class DocumentStatusModel
Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("ENVELOPE_ID", SqlDbType.Int).Value = pDocumentStatus.EnvelopeId
oCommand.Parameters.Add("RECEIVER_ID", SqlDbType.Int).Value = pDocumentStatus.ReceiverId
oCommand.Parameters.Add("STATUS", SqlDbType.NVarChar).Value = pDocumentStatus.Status.ToString()
oCommand.Parameters.Add("STATUS", SqlDbType.Int).Value = pDocumentStatus.Status
oCommand.Parameters.Add("STATUS_CHANGED_WHEN", SqlDbType.DateTime).Value = Now()
oCommand.Parameters.Add("VALUE", SqlDbType.NVarChar).Value = pDocumentStatus.Value
@@ -60,7 +60,7 @@ Public Class DocumentStatusModel
Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("GUID", SqlDbType.Int).Value = pDocumentStatus.Id
oCommand.Parameters.Add("STATUS", SqlDbType.NVarChar).Value = pDocumentStatus.Status.ToString()
oCommand.Parameters.Add("STATUS", SqlDbType.Int).Value = pDocumentStatus.Status
oCommand.Parameters.Add("STATUS_CHANGED_WHEN", SqlDbType.DateTime).Value = Now()
oCommand.Parameters.Add("CHANGED_WHEN", SqlDbType.DateTime).Value = Now()
oCommand.Parameters.Add("VALUE", SqlDbType.NVarChar).Value = pDocumentStatus.Value

View File

@@ -14,7 +14,7 @@ Public Class ElementModel
.Id = pRow.ItemEx("GUID", 0),
.DocumentId = pRow.ItemEx("DOCUMENT_ID", 0),
.ReceiverId = pRow.ItemEx("RECEIVER_ID", 0),
.ElementType = [Enum].Parse(GetType(Constants.ElementType), pRow.ItemEx("ELEMENT_TYPE", Constants.ElementType.Signature.ToString)),
.ElementType = [Enum].Parse(GetType(Constants.ElementType), pRow.ItemEx("ELEMENT_TYPE", Constants.ElementType.Signature)),
.X = pRow.ItemEx("POSITION_X", 0.0),
.Y = pRow.ItemEx("POSITION_Y", 0.0),
.Width = pRow.ItemEx("WIDTH", 0.0),
@@ -138,7 +138,7 @@ Public Class ElementModel
Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("DOCUMENT_ID", SqlDbType.NVarChar).Value = pElement.DocumentId
oCommand.Parameters.Add("RECEIVER_ID", SqlDbType.NVarChar).Value = pElement.ReceiverId
oCommand.Parameters.Add("ELEMENT_TYPE", SqlDbType.NVarChar).Value = pElement.ElementType
oCommand.Parameters.Add("ELEMENT_TYPE", SqlDbType.Int).Value = pElement.ElementType
oCommand.Parameters.Add("POSITION_X", SqlDbType.Float).Value = pElement.X
oCommand.Parameters.Add("POSITION_Y", SqlDbType.Float).Value = pElement.Y
oCommand.Parameters.Add("WIDTH", SqlDbType.Float).Value = pElement.Width

View File

@@ -25,7 +25,7 @@ Public Class ElementStatusModel
Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("ENVELOPE_ID", SqlDbType.Int).Value = pElementStatus.EnvelopeId
oCommand.Parameters.Add("ELEMENT_ID", SqlDbType.Int).Value = pElementStatus.ElementId
oCommand.Parameters.Add("STATUS", SqlDbType.NVarChar).Value = pElementStatus.Status.ToString()
oCommand.Parameters.Add("STATUS", SqlDbType.Int).Value = pElementStatus.Status
oCommand.Parameters.Add("STATUS_CHANGED_WHEN", SqlDbType.DateTime).Value = Now()
oCommand.Parameters.Add("VALUE", SqlDbType.NVarChar).Value = pElementStatus.ElementValue
@@ -52,7 +52,7 @@ Public Class ElementStatusModel
Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("GUID", SqlDbType.Int).Value = pElementStatus.Id
oCommand.Parameters.Add("STATUS", SqlDbType.NVarChar).Value = pElementStatus.Status.ToString()
oCommand.Parameters.Add("STATUS", SqlDbType.Int).Value = pElementStatus.Status
oCommand.Parameters.Add("STATUS_CHANGED_WHEN", SqlDbType.DateTime).Value = Now()
oCommand.Parameters.Add("CHANGED_WHEN", SqlDbType.DateTime).Value = Now()
oCommand.Parameters.Add("VALUE", SqlDbType.NVarChar).Value = pElementStatus.ElementValue

View File

@@ -22,12 +22,12 @@ Public Class EnvelopeModel
Dim oEnvelope = New Envelope() With {
.Id = pRow.ItemEx("GUID", 0),
.Title = pRow.ItemEx("TITLE", ""),
.ContractType = ObjectEx.ToEnum(Of Constants.ContractType)(pRow.ItemEx("CONTRACT_TYPE", "Contract")),
.ContractType = ObjectEx.ToEnum(Of Constants.ContractType)(pRow.ItemEx("CONTRACT_TYPE", Constants.ContractType.Contract.ToString())),
.Uuid = pRow.ItemEx("ENVELOPE_UUID", ""),
.Subject = pRow.ItemEx("SUBJECT", ""),
.Message = pRow.ItemEx("MESSAGE", ""),
.UserId = pRow.ItemEx("USER_ID", 0),
.Status = ObjectEx.ToEnum(Of Constants.EnvelopeStatus)(pRow.ItemEx("STATUS", "Created")),
.Status = ObjectEx.ToEnum(Of Constants.EnvelopeStatus)(pRow.ItemEx("STATUS", Constants.EnvelopeStatus.Created.ToString())),
.AddedWhen = pRow.Item("ADDED_WHEN"),
.User = New User()
}
@@ -129,10 +129,10 @@ Public Class EnvelopeModel
oCommand.Parameters.Add("SUBJECT", SqlDbType.NVarChar).Value = String.Empty
oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = String.Empty
oCommand.Parameters.Add("UUID", SqlDbType.NVarChar).Value = pEnvelope.Uuid
oCommand.Parameters.Add("STATUS", SqlDbType.NVarChar).Value = Constants.EnvelopeStatus.Created.ToString()
oCommand.Parameters.Add("STATUS", SqlDbType.Int).Value = Constants.EnvelopeStatus.Created
oCommand.Parameters.Add("USER_ID", SqlDbType.Int).Value = pEnvelope.UserId
oCommand.Parameters.Add("TITLE", SqlDbType.NVarChar).Value = pEnvelope.Title
oCommand.Parameters.Add("CONTRACT_TYPE", SqlDbType.NVarChar).Value = pEnvelope.ContractType.ToString()
oCommand.Parameters.Add("CONTRACT_TYPE", SqlDbType.Int).Value = pEnvelope.ContractType
If Database.ExecuteNonQuery(oCommand) Then
pEnvelope.Id = GetEnvelopeId(pEnvelope)
@@ -161,9 +161,9 @@ Public Class EnvelopeModel
Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("SUBJECT", SqlDbType.NVarChar).Value = pEnvelope.Subject
oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = pEnvelope.Message
oCommand.Parameters.Add("STATUS", SqlDbType.NVarChar).Value = pEnvelope.Status
oCommand.Parameters.Add("STATUS", SqlDbType.Int).Value = pEnvelope.Status
oCommand.Parameters.Add("TITLE", SqlDbType.NVarChar).Value = pEnvelope.Title
oCommand.Parameters.Add("CONTRACT_TYPE", SqlDbType.NVarChar).Value = pEnvelope.ContractType.ToString()
oCommand.Parameters.Add("CONTRACT_TYPE", SqlDbType.Int).Value = pEnvelope.ContractType
oCommand.Parameters.Add("ID", SqlDbType.Int).Value = pEnvelope.Id
oCommand.Parameters.Add("USER_ID", SqlDbType.Int).Value = pEnvelope.UserId

View File

@@ -25,7 +25,7 @@ Public Class HistoryModel
Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("ENVELOPE_ID", SqlDbType.Int).Value = pHistory.EnvelopeId
oCommand.Parameters.Add("USER_REFERENCE", SqlDbType.NVarChar).Value = pHistory.UserReference
oCommand.Parameters.Add("ACTION_TYPE", SqlDbType.NVarChar).Value = pHistory.ActionType.ToString()
oCommand.Parameters.Add("ACTION_TYPE", SqlDbType.Int).Value = pHistory.ActionType
oCommand.Parameters.Add("ACTION_DESCRIPTION", SqlDbType.NVarChar).Value = pHistory.ActionDescription
oCommand.Parameters.Add("ACTION_DATE", SqlDbType.DateTime).Value = Now()

View File

@@ -71,7 +71,7 @@ Public Class FieldEditorController
Dim oInfo = GetElementInfo(pAnnotation.Tag)
Elements.Add(New EnvelopeDocumentElement() With {
.ElementType = Common.Constants.ElementType.Signature.ToString,
.ElementType = Constants.ElementType.Signature,
.Height = pAnnotation.Height,
.Width = pAnnotation.Width,
.X = pAnnotation.Left,