MS Service Invitations API,Form 2Faktor Properties

This commit is contained in:
Developer01
2025-05-08 14:37:34 +02:00
parent dc4b5bade0
commit 5a8f2d298f
18 changed files with 605 additions and 23 deletions

View File

@@ -0,0 +1,43 @@
Imports DigitalData.Modules.Database
Imports EnvelopeGenerator.Common.My
Public Class frm2Factor_Properties
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
If MsgBox(Resources.Model.ResetTOTPUser, MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text) = MsgBoxResult.Yes Then
Dim oupdSQL = $"UPDATE TBSIG_RECEIVER SET TOTP_SECRET_KEY = NULL, TFA_REG_DEADLINE = NULL WHERE EMAIL_ADDRESS = '{txtMail.Text}'"
If DD_ECM.ExecuteNonQuery(oupdSQL) = True Then
MsgBox(Resources.Model.Success_FormClose, MsgBoxStyle.Information)
Me.Close()
Else
MsgBox("Something went wrong. Check the log", MsgBoxStyle.Exclamation)
End If
End If
End Sub
Dim TOTP As String
Dim mail As String
Dim Deadline As DateTime
Dim DD_ECM As MSSQLServer
Public Sub New(pmail As String, pTOTP As String, pDeadline As DateTime, pDD_ECM As MSSQLServer)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
mail = pmail
TOTP = pTOTP
Deadline = pDeadline
DD_ECM = pDD_ECM
End Sub
Private Sub frm2Faktor_Load(sender As Object, e As EventArgs) Handles Me.Load
chkTOTP.Checked = False
If Not IsNothing(TOTP) Then
If TOTP.Length > 1 Then
chkTOTP.Checked = True
End If
End If
txtMail.Text = mail
txtValid.Text = Deadline.ToLongDateString
End Sub
End Class