add user assignment
This commit is contained in:
@@ -44,6 +44,8 @@ Public Class frmAdministration
|
||||
Dim oDragDropManager As New ClassDragDrop()
|
||||
oDragDropManager.AddGridView(viewAssignedGroups)
|
||||
oDragDropManager.AddGridView(viewAvailableGroups)
|
||||
oDragDropManager.AddGridView(viewAssignedUsers)
|
||||
oDragDropManager.AddGridView(viewAvailableUsers)
|
||||
|
||||
RibbonPageCategoryUserGroups.Visible = False
|
||||
RibbonPageCategoryMisc.Visible = False
|
||||
@@ -221,6 +223,8 @@ Public Class frmAdministration
|
||||
|
||||
gridAssignedGroups.DataSource = ClassDatatables.GetAssignedGroups(CURRENT_DOKART_ID)
|
||||
gridAvailableGroups.DataSource = ClassDatatables.GetAvailableGroups(CURRENT_DOKART_ID)
|
||||
gridAssignedUsers.DataSource = ClassDatatables.GetAssignedUsers(CURRENT_DOKART_ID)
|
||||
gridAvailableUsers.DataSource = ClassDatatables.GetAvailableUsers(CURRENT_DOKART_ID)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -976,7 +980,6 @@ Public Class frmAdministration
|
||||
Try
|
||||
Dim data As String = e.Data.GetData(DataFormats.Text)
|
||||
Dim groupId As Integer = data.Split("|")(0)
|
||||
|
||||
Dim profileId As Integer = DOKART_GUIDTextBox.Text
|
||||
|
||||
ClassDatatables.AddGroupToProfile(groupId, profileId)
|
||||
@@ -984,7 +987,7 @@ Public Class frmAdministration
|
||||
gridAvailableGroups.DataSource = ClassDatatables.GetAvailableGroups(profileId)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Hinzufügen eines Users:")
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Hinzufügen einer Gruppe:")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -999,7 +1002,7 @@ Public Class frmAdministration
|
||||
gridAvailableGroups.DataSource = ClassDatatables.GetAvailableGroups(profileId)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Hinzufügen eines Users:")
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Hinzufügen einer Gruppe:")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -1249,7 +1252,7 @@ Public Class frmAdministration
|
||||
If result = MsgBoxResult.Yes Then
|
||||
If GUIDTextBox1.Text <> "" Then
|
||||
Try
|
||||
Dim del = "DELETE FROM TBDD_INDEX_MAN_POSTPROCESSING WHERE IDXMAN_ID = " & GUIDTextBox1.Text
|
||||
Dim del = "DELETE FROM TBDD_INDEX_MAN_POSTPROCESSING WHERE GUID = " & GUIDTextBox4.Text
|
||||
If ClassDatabase.Execute_non_Query(del) = True Then
|
||||
Load_PostProcessing(Me.DOKART_GUIDTextBox.Text)
|
||||
End If
|
||||
@@ -1300,4 +1303,34 @@ Public Class frmAdministration
|
||||
Private Sub BarButtonItem25_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem25.ItemClick
|
||||
Save_IndexAuto()
|
||||
End Sub
|
||||
|
||||
Private Sub gridAssignedUsers_DragDrop(sender As Object, e As DragEventArgs) Handles gridAssignedUsers.DragDrop
|
||||
Try
|
||||
Dim data As String = e.Data.GetData(DataFormats.Text)
|
||||
Dim userId As Integer = data.Split("|")(0)
|
||||
Dim profileId As Integer = DOKART_GUIDTextBox.Text
|
||||
|
||||
ClassDatatables.AddUserToProfile(userId, profileId)
|
||||
gridAssignedUsers.DataSource = ClassDatatables.GetAssignedUsers(profileId)
|
||||
gridAvailableUsers.DataSource = ClassDatatables.GetAvailableUsers(profileId)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Hinzufügen eines Users:")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub gridAvailableUsers_DragDrop(sender As Object, e As DragEventArgs) Handles gridAvailableUsers.DragDrop
|
||||
Try
|
||||
Dim data As String = e.Data.GetData(DataFormats.Text)
|
||||
Dim userId As Integer = data.Split("|")(0)
|
||||
Dim profileId As Integer = DOKART_GUIDTextBox.Text
|
||||
|
||||
ClassDatatables.RemoveUserFromProfile(userId, profileId)
|
||||
gridAssignedUsers.DataSource = ClassDatatables.GetAssignedUsers(profileId)
|
||||
gridAvailableUsers.DataSource = ClassDatatables.GetAvailableUsers(profileId)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Hinzufügen eines Users:")
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user