use connection id, clean up ribbon, move basic settings, move license management to admin

This commit is contained in:
Jonathan Jenne
2020-06-02 16:31:13 +02:00
parent 18e9ca2a99
commit b15eecb3cc
7 changed files with 435 additions and 218 deletions

View File

@@ -1,6 +1,7 @@
Imports DigitalData.Modules.Database
Public Class frmAdministration
Private SelectedProcessName As String
Private _SelectedProcessName As String
Private _DragDrop As ClassDragDrop
Private Const MAX_DATA_SEARCHES = 5
Private Const MAX_DOC_SEARCHES = 5
@@ -11,7 +12,6 @@ Public Class frmAdministration
Public Overrides Function ToString() As String
Return Name
Return Name
End Function
End Class
@@ -25,6 +25,12 @@ Public Class frmAdministration
' Select first tab to prevent profile textbox from being empty
XtraTabControl3.SelectedTabPageIndex = 0
_DragDrop = New ClassDragDrop()
'_DragDrop.AddGridView(GridViewGroupInProfile)
'_DragDrop.AddGridView(GridViewGroupNotInProfile)
_DragDrop.AddGridView(GridViewUserInProfile)
_DragDrop.AddGridView(GridViewUserNotInProfile)
Load_Profiles()
Load_ProfileTypes()
Load_SearchPositions()
@@ -577,11 +583,6 @@ Public Class frmAdministration
End Try
End Sub
Private Sub BarButtonItem16_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem16.ItemClick
Dim oForm As New frmConnection()
oForm.ShowDialog()
End Sub
Private Sub BarButtonItem9_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem9.ItemClick
If CtrlApplicationAssignment1.Window_SaveAssignment() = False Then
MsgBox("Error while saving window", MsgBoxStyle.Critical, Text)
@@ -590,11 +591,6 @@ Public Class frmAdministration
End If
End Sub
Private Sub BarButtonItem17_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem17.ItemClick
Dim oform As New frmLicenseInfo()
oform.ShowDialog()
End Sub
Private Sub BarButtonItem15_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem15.ItemClick
If TBCW_PROF_DOC_SEARCHBindingSource.Count = MAX_DOC_SEARCHES Then
MsgBox($"Es können nicht mehr als {MAX_DOC_SEARCHES} Dokument-Suchen angelegt werden!", MsgBoxStyle.Exclamation, Text)
@@ -729,4 +725,62 @@ Public Class frmAdministration
MsgBox("Profile has been duplicated. Please check the dependencies!", MsgBoxStyle.Information)
End If
End Sub
Private Sub BarButtonItem16_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem16.ItemClick
Dim oForm As New frmConnection()
oForm.ShowDialog()
End Sub
Private Sub BarButtonItem17_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem17.ItemClick
End Sub
Private Sub BarButtonItem28_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem28.ItemClick
Dim oForm As New frmConnection()
oForm.ShowDialog()
End Sub
Private Sub BarButtonItem29_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem29.ItemClick
Dim oform As New frmLicenseInfo()
oform.ShowDialog()
End Sub
Private Sub frmAdministration_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.F12 And USER_IS_ADMIN = True Then
frmLicense.ShowDialog()
End If
End Sub
Private Sub GridControlUserInProfile_DragDrop(sender As Object, e As DragEventArgs) Handles GridControlUserInProfile.DragDrop
'Try
' If PROFILE_IDTextBox.Text = String.Empty Then
' Exit Sub
' End If
' Dim oSelectedRows = GridViewUserNotInProfile.GetSelectedRows()
' For Each oRowHandle As Integer In oSelectedRows
' Dim oRow As DataRow = GridViewUserNotInProfile.GetDataRow(oRowHandle)
' Dim oGuid As Integer = oRow.Item("ID")
' Dim insert = String.Format("INSERT INTO TBCW_USER_PROFILE (PROFILE_ID,USER_ID) VALUES ({0},{1})", PROFILE_IDTextBox.Text, oGuid)
' If Database.ExecuteNonQuery(insert) = False Then
' MsgBox("Error while adding user!", MsgBoxStyle.Exclamation)
' End If
' Next
' Refresh_Free_Users(PROFILE_IDTextBox.Text)
' Refresh_ProfileData()
' GridViewUserNotInProfile.ClearSelection()
' Status_Changed($"{oSelectedRows.Count} Benutzer zugeordnet")
'Catch ex As Exception
' Logger.Error(ex)
' MsgBox("Unexpected Error while adding user-rights: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
'End Try
End Sub
Private Sub GridControlUserNotInProfile_DragDrop(sender As Object, e As DragEventArgs) Handles GridControlUserNotInProfile.DragDrop
End Sub
End Class