MS Anpassungen

This commit is contained in:
Developer01
2025-11-12 21:43:50 +01:00
parent 69afea012b
commit 1e2e018f7f
6 changed files with 309 additions and 104 deletions

View File

@@ -269,9 +269,10 @@ Public Class frmMain
Private Sub ViewEnvelopes_FocusedRowChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs) Handles ViewEnvelopes.FocusedRowChanged
If ViewEnvelopes.FocusedRowHandle < 0 Then
RibbonPageGroupReceiver.Enabled = False
Exit Sub
End If
sd
Dim oEnvelope As Envelope = ViewEnvelopes.GetRow(ViewEnvelopes.FocusedRowHandle)
txtEnvelopeIdLabel.Caption = String.Format(txtEnvelopeIdLabel.Tag, oEnvelope.Id)
@@ -802,7 +803,6 @@ Public Class frmMain
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
@@ -925,4 +925,49 @@ Public Class frmMain
Dim oGridlayoutFullFilename = System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
Return oGridlayoutFullFilename
End Function
Private Sub ViewReceivers_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles ViewReceivers.FocusedRowChanged
Dim detailView As GridView = TryCast(sender, GridView)
' Sicherstellen, dass die View gültig ist
If detailView Is Nothing Then
Exit Sub
End If
' Prüfen, ob der RowHandle gültig ist
If Not detailView.IsValidRowHandle(e.FocusedRowHandle) Then
Exit Sub
End If
Dim row = detailView.GetRow(e.FocusedRowHandle)
If row Is Nothing Then
Exit Sub
End If
Dim oReceiver As Receiver = CType(row, Receiver)
'Dim oEnvelopeTitle As String = Net.WebUtility.UrlEncode(oEnvelope.Title)
If Not IsNothing(oReceiver) Then
Dim oDT As DataTable = DB_DD_ECM.GetDatatable($"SELECT * FROM TBSIG_RECEIVER WHERE EMAIL_ADDRESS = '{oReceiver.EmailAddress}'")
If Not IsNothing(oDT) Then
If oDT.Rows.Count = 1 Then
RibbonPageGroupReceiver.Enabled = True
Dim oTFA_REG_DL = oDT.Rows(0).Item("TFA_REG_DEADLINE")
Dim oTOTP = oDT.Rows(0).Item("TOTP_SECRET_KEY")
If Not IsDBNull(oTOTP) And Not IsDBNull(oTFA_REG_DL) Then
bbtnitm2Faktor.Enabled = True
Else
bbtnitm2Faktor.Enabled = False
End If
Else
RibbonPageGroupReceiver.Enabled = False
End If
End If
End If
End Sub
End Class