This commit is contained in:
Jonathan Jenne
2023-11-20 10:56:25 +01:00
parent 36e441106a
commit ea35ed0e29
12 changed files with 83 additions and 100 deletions

View File

@@ -7,6 +7,15 @@ Public Class HistoryModel
MyBase.New(pState)
End Sub
Private Function GetActionDescription(pActionType As Constants.EnvelopeHistoryActionType)
Select Case pActionType
Case Constants.EnvelopeHistoryActionType.Created
Return "Umschlag erfolgreich erstellt"
Case Else
Return pActionType.ToString()
End Select
End Function
Public Function Insert(pHistory As EnvelopeHistoryEntry) As Boolean
Try
Dim oSql = "INSERT INTO [dbo].[TBSIG_ENVELOPE_HISTORY] "
@@ -26,7 +35,7 @@ Public Class HistoryModel
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.Int).Value = pHistory.ActionType
oCommand.Parameters.Add("ACTION_DESCRIPTION", SqlDbType.NVarChar).Value = pHistory.ActionDescription
oCommand.Parameters.Add("ACTION_DESCRIPTION", SqlDbType.NVarChar).Value = GetActionDescription(pHistory.ActionType)
oCommand.Parameters.Add("ACTION_DATE", SqlDbType.DateTime).Value = Now()
If Database.ExecuteNonQuery(oCommand) Then