Resend AccessCode Manually

This commit is contained in:
Developer01
2025-07-14 15:19:05 +02:00
parent 888c04b5c9
commit fe7030b9d7
6 changed files with 124 additions and 19 deletions

View File

@@ -841,4 +841,46 @@ Public Class frmMain
.DbConfig = Nothing
}
End Function
Private Sub BarButtonItem2_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
Try
Dim oView As GridView = GridEnvelopes.FocusedView
Dim selReceiver As Receiver
If oView.Name = ViewReceivers.Name Then
selReceiver = oView.GetRow(oView.FocusedRowHandle)
Else
MsgBox(Resources.Envelope.Please_select_a_recipient_from_the_Recipients_tab, MsgBoxStyle.Information, Text)
End If
If ViewEnvelopes.FocusedRowHandle < 0 Or IsNothing(selReceiver) Then
Exit Sub
End If
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 Receivers As New BindingList(Of Receiver)
Receivers = New BindingList(Of Receiver)(oController.Envelope.Receivers)
For Each oReceiver As Receiver In Receivers
If oReceiver.EmailAddress = selReceiver.EmailAddress Then
If oController.ActionService.ManuallySendAccessCode(oEnvelope, oReceiver) = True Then
Dim oMsg = Resources.Envelope.Invitation_successfully_resend.Replace("@Mail", oReceiver.EmailAddress)
MsgBox(oMsg, MsgBoxStyle.Information, Text)
End If
End If
Next
Else
MsgBox("Envelope is defined without AccessCode so far!", MsgBoxStyle.Information)
End If
Catch ex As Exception
Logger.Error(ex)
Finally
End Try
SplashScreenManager.CloseOverlayForm(oHandle)
End Sub
End Class