MS Service Invitations API,Form 2Faktor Properties
This commit is contained in:
@@ -14,6 +14,8 @@ Imports System.Diagnostics
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.XtraPrinting
|
||||
Imports System.Web
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports System.Security.Cryptography
|
||||
|
||||
Public Class frmMain
|
||||
Private ReadOnly LogConfig As LogConfig
|
||||
@@ -767,4 +769,63 @@ Public Class frmMain
|
||||
GridControlData.DataSource = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub bbtnitm2Faktor_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitm2Faktor.ItemClick
|
||||
If ViewEnvelopes.FocusedRowHandle < 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oEnvelope As Envelope = ViewEnvelopes.GetRow(ViewEnvelopes.FocusedRowHandle)
|
||||
Dim oView As GridView = GridEnvelopes.FocusedView
|
||||
If oView.Name = ViewReceivers.Name Then
|
||||
Dim oReceiver As EnvelopeReceiver = oView.GetRow(oView.FocusedRowHandle)
|
||||
Dim oEnvelopeTitle As String = Net.WebUtility.UrlEncode(oEnvelope.Title)
|
||||
Dim oDT As DataTable = DB_DD_ECM.GetDatatable($"SELECT * FROM TBSIG_RECEIVER WHERE EMAIL_ADDRESS = '{oReceiver.Email}'")
|
||||
If Not IsNothing(oDT) Then
|
||||
If oDT.Rows.Count = 1 Then
|
||||
Dim oTFA_REG_DL = oDT.Rows(0).Item("TFA_REG_DEADLINE")
|
||||
Dim oTOTP = oDT.Rows(0).Item("TOTP_SECRET_KEY")
|
||||
Dim oForm As New frm2Factor_Properties(oReceiver.Email, oTOTP, oTFA_REG_DL, DB_DD_ECM)
|
||||
oForm.ShowDialog()
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgBox(Resources.Envelope.Please_select_a_recipient_from_the_Recipients_tab, MsgBoxStyle.Information, Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
If txtEnvID.Text = String.Empty Then
|
||||
Exit Sub
|
||||
End If
|
||||
Dim EnvelopeModel As EnvelopeModel
|
||||
Dim oState = GetState()
|
||||
EnvelopeModel = New EnvelopeModel(oState)
|
||||
|
||||
Dim oEnvelope = EnvelopeModel.GetById(txtEnvID.Text)
|
||||
Dim oMailToCreator = oEnvelope.FinalEmailToCreator
|
||||
Dim oMailToReceivers = oEnvelope.FinalEmailToReceivers
|
||||
|
||||
If oMailToCreator <> FinalEmailType.No Then
|
||||
MsgBox("Finale email an Creator könnten/würden gesendet werden!")
|
||||
Else
|
||||
MsgBox("Finale email an Creator könnte/würde nicht erzeugt werden!" & vbNewLine & $"No SendFinalEmailToCreator - oMailToCreator [{oMailToCreator}] <> [{FinalEmailType.No}]")
|
||||
End If
|
||||
|
||||
If oMailToReceivers <> FinalEmailType.No Then
|
||||
MsgBox("Finale email an Unterzeichner könnten/würden gesendet werden!")
|
||||
Else
|
||||
MsgBox("Finale email an Unterzeichner könnte/würde nicht erzeugt werden!" & vbNewLine & $"No SendFinalEmailToReceivers - oMailToReceivers [{oMailToReceivers}] <> [{FinalEmailType.No}]")
|
||||
End If
|
||||
End Sub
|
||||
Private Function GetState() As State
|
||||
Return New State With {
|
||||
.LogConfig = LogConfig,
|
||||
.UserId = 0,
|
||||
.Database = DB_DD_ECM,
|
||||
.Config = Nothing,
|
||||
.DbConfig = Nothing
|
||||
}
|
||||
End Function
|
||||
End Class
|
||||
Reference in New Issue
Block a user