fix drag drop !!!!111einself11111!!!

This commit is contained in:
Jonathan Jenne 2020-06-05 16:21:16 +02:00
parent d3373e0368
commit b1542c7091
6 changed files with 1196 additions and 1243 deletions

File diff suppressed because it is too large Load Diff

View File

@ -925,7 +925,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH
<xs:element name="Prename" msprop:Generator_ColumnVarNameInTable="columnPrename" msprop:Generator_ColumnPropNameInRow="Prename" msprop:Generator_ColumnPropNameInTable="PrenameColumn" msprop:Generator_UserColumnName="Prename" type="xs:string" minOccurs="0" />
<xs:element name="Surname" msprop:Generator_ColumnVarNameInTable="columnSurname" msprop:Generator_ColumnPropNameInRow="Surname" msprop:Generator_ColumnPropNameInTable="SurnameColumn" msprop:Generator_UserColumnName="Surname" type="xs:string" minOccurs="0" />
<xs:element name="Email" msprop:Generator_ColumnVarNameInTable="columnEmail" msprop:Generator_ColumnPropNameInRow="Email" msprop:Generator_ColumnPropNameInTable="EmailColumn" msprop:Generator_UserColumnName="Email" type="xs:string" minOccurs="0" />
<xs:element name="ID" msprop:Generator_ColumnVarNameInTable="columnID" msprop:Generator_ColumnPropNameInRow="ID" msprop:Generator_ColumnPropNameInTable="IDColumn" msprop:Generator_UserColumnName="ID" type="xs:short" minOccurs="0" />
<xs:element name="GUID" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_UserColumnName="GUID" type="xs:short" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
@ -1068,7 +1068,7 @@ SELECT GUID, WINDOW_ID, DESCRIPTION, SEQUENCE, ADDED_WHO, ADDED_WHEN, CHANGED_WH
<xs:element name="TBWH_GROUP" msprop:Generator_TableClassName="TBWH_GROUPDataTable" msprop:Generator_TableVarName="tableTBWH_GROUP" msprop:Generator_TablePropName="TBWH_GROUP" msprop:Generator_RowDeletingName="TBWH_GROUPRowDeleting" msprop:Generator_RowChangingName="TBWH_GROUPRowChanging" msprop:Generator_RowEvHandlerName="TBWH_GROUPRowChangeEventHandler" msprop:Generator_RowDeletedName="TBWH_GROUPRowDeleted" msprop:Generator_UserTableName="TBWH_GROUP" msprop:Generator_RowChangedName="TBWH_GROUPRowChanged" msprop:Generator_RowEvArgName="TBWH_GROUPRowChangeEvent" msprop:Generator_RowClassName="TBWH_GROUPRow">
<xs:complexType>
<xs:sequence>
<xs:element name="ID" msprop:Generator_ColumnVarNameInTable="columnID" msprop:Generator_ColumnPropNameInRow="ID" msprop:Generator_ColumnPropNameInTable="IDColumn" msprop:Generator_UserColumnName="ID" type="xs:string" minOccurs="0" />
<xs:element name="GUID" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_UserColumnName="GUID" type="xs:string" minOccurs="0" />
<xs:element name="NAME" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_UserColumnName="NAME" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>

View File

@ -4,7 +4,7 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
</autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="301" ViewPortY="-45" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-54" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes>
<Shape ID="DesignTable:TBCW_PROFILES" ZOrder="19" X="14" Y="-44" Height="286" Width="240" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
<Shape ID="DesignTable:TBCW_USER_PROFILE" ZOrder="8" X="680" Y="299" Height="172" Width="271" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
@ -17,7 +17,7 @@
<Shape ID="DesignTable:TBCW_PROF_REL_WINDOW" ZOrder="5" X="10" Y="259" Height="248" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="24" SplitterPosition="197" />
<Shape ID="DesignTable:TBDD_CONNECTION" ZOrder="7" X="675" Y="483" Height="305" Width="264" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:TBCW_PROF_REL_CONTROL" ZOrder="2" X="330" Y="327" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:TBWH_User" ZOrder="17" X="1221" Y="436" Height="124" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="139" />
<Shape ID="DesignTable:TBWH_User" ZOrder="17" X="1221" Y="436" Height="124" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="120" />
<Shape ID="DesignTable:TBWH_GROUP" ZOrder="11" X="1240" Y="329" Height="67" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="63" />
<Shape ID="DesignTable:TBWH_PROFILE_TYPE" ZOrder="9" X="1204" Y="609" Height="67" Width="190" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="63" />
<Shape ID="DesignTable:TBWH_SEARCH_POSITION" ZOrder="1" X="990" Y="605" Height="67" Width="218" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="63" />

View File

@ -87,8 +87,6 @@ Partial Class frmAdministration
Me.RibbonGroup_Process = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonGroup_Window = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonGroup_Control = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonGroup_User = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonGroup_Group = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
@ -794,7 +792,7 @@ Partial Class frmAdministration
'
'RibbonPage2
'
Me.RibbonPage2.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonGroup_Profile, Me.RibbonGroup_DocSearch, Me.RibbonGroup_DataSearch, Me.RibbonGroup_Process, Me.RibbonGroup_Window, Me.RibbonGroup_Control, Me.RibbonGroup_User, Me.RibbonGroup_Group})
Me.RibbonPage2.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonGroup_Profile, Me.RibbonGroup_DocSearch, Me.RibbonGroup_DataSearch, Me.RibbonGroup_Process, Me.RibbonGroup_Window, Me.RibbonGroup_Control})
Me.RibbonPage2.Name = "RibbonPage2"
Me.RibbonPage2.Text = "Start"
'
@ -853,22 +851,6 @@ Partial Class frmAdministration
Me.RibbonGroup_Control.Name = "RibbonGroup_Control"
Me.RibbonGroup_Control.Text = "Feld Zuordnung"
'
'RibbonGroup_User
'
Me.RibbonGroup_User.Enabled = False
Me.RibbonGroup_User.ItemLinks.Add(Me.BarButtonItem11)
Me.RibbonGroup_User.ItemLinks.Add(Me.BarButtonItem12)
Me.RibbonGroup_User.Name = "RibbonGroup_User"
Me.RibbonGroup_User.Text = "Benutzer Zuordnung"
'
'RibbonGroup_Group
'
Me.RibbonGroup_Group.Enabled = False
Me.RibbonGroup_Group.ItemLinks.Add(Me.BarButtonItem13)
Me.RibbonGroup_Group.ItemLinks.Add(Me.BarButtonItem14)
Me.RibbonGroup_Group.Name = "RibbonGroup_Group"
Me.RibbonGroup_Group.Text = "Gruppen Zuordnung"
'
'RibbonPage1
'
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1})
@ -1980,7 +1962,9 @@ Partial Class frmAdministration
Me.GridViewUserNotInProfile.OptionsView.ColumnAutoWidth = False
Me.GridViewUserNotInProfile.OptionsView.EnableAppearanceEvenRow = True
Me.GridViewUserNotInProfile.OptionsView.ShowAutoFilterRow = True
Me.GridViewUserNotInProfile.OptionsView.ShowDetailButtons = False
Me.GridViewUserNotInProfile.OptionsView.ShowGroupPanel = False
Me.GridViewUserNotInProfile.OptionsView.ShowVerticalLines = DevExpress.Utils.DefaultBoolean.[True]
'
'colSurname
'
@ -2055,6 +2039,7 @@ Partial Class frmAdministration
'
'GridControlGroupInProfile
'
Me.GridControlGroupInProfile.AllowDrop = True
Me.GridControlGroupInProfile.DataSource = Me.VWCW_GROUP_PROFILEBindingSource
Me.GridControlGroupInProfile.Dock = System.Windows.Forms.DockStyle.Fill
Me.GridControlGroupInProfile.Location = New System.Drawing.Point(0, 25)
@ -2079,7 +2064,6 @@ Partial Class frmAdministration
Me.GridViewGroupInProfile.OptionsBehavior.Editable = False
Me.GridViewGroupInProfile.OptionsBehavior.ReadOnly = True
Me.GridViewGroupInProfile.OptionsSelection.MultiSelect = True
Me.GridViewGroupInProfile.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect
Me.GridViewGroupInProfile.OptionsView.EnableAppearanceEvenRow = True
Me.GridViewGroupInProfile.OptionsView.ShowAutoFilterRow = True
Me.GridViewGroupInProfile.OptionsView.ShowGroupPanel = False
@ -2092,7 +2076,7 @@ Partial Class frmAdministration
Me.colGUID3.MinWidth = 40
Me.colGUID3.Name = "colGUID3"
Me.colGUID3.Visible = True
Me.colGUID3.VisibleIndex = 1
Me.colGUID3.VisibleIndex = 0
Me.colGUID3.Width = 40
'
'colNAME2
@ -2101,7 +2085,7 @@ Partial Class frmAdministration
Me.colNAME2.FieldName = "NAME"
Me.colNAME2.Name = "colNAME2"
Me.colNAME2.Visible = True
Me.colNAME2.VisibleIndex = 2
Me.colNAME2.VisibleIndex = 1
Me.colNAME2.Width = 40
'
'Label9
@ -2117,6 +2101,7 @@ Partial Class frmAdministration
'
'GridControlGroupNotInProfile
'
Me.GridControlGroupNotInProfile.AllowDrop = True
Me.GridControlGroupNotInProfile.DataSource = Me.TBWH_GROUPBindingSource
Me.GridControlGroupNotInProfile.Dock = System.Windows.Forms.DockStyle.Fill
Me.GridControlGroupNotInProfile.Location = New System.Drawing.Point(0, 25)
@ -2141,7 +2126,6 @@ Partial Class frmAdministration
Me.GridViewGroupNotInProfile.OptionsBehavior.Editable = False
Me.GridViewGroupNotInProfile.OptionsBehavior.ReadOnly = True
Me.GridViewGroupNotInProfile.OptionsSelection.MultiSelect = True
Me.GridViewGroupNotInProfile.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect
Me.GridViewGroupNotInProfile.OptionsView.EnableAppearanceEvenRow = True
Me.GridViewGroupNotInProfile.OptionsView.ShowAutoFilterRow = True
Me.GridViewGroupNotInProfile.OptionsView.ShowGroupPanel = False
@ -2154,7 +2138,7 @@ Partial Class frmAdministration
Me.colID1.MinWidth = 40
Me.colID1.Name = "colID1"
Me.colID1.Visible = True
Me.colID1.VisibleIndex = 1
Me.colID1.VisibleIndex = 0
Me.colID1.Width = 40
'
'colNAME3
@ -2163,7 +2147,7 @@ Partial Class frmAdministration
Me.colNAME3.FieldName = "NAME"
Me.colNAME3.Name = "colNAME3"
Me.colNAME3.Visible = True
Me.colNAME3.VisibleIndex = 2
Me.colNAME3.VisibleIndex = 1
'
'Label10
'
@ -2466,8 +2450,6 @@ Partial Class frmAdministration
Friend WithEvents BarButtonItem12 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem13 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem14 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonGroup_User As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents RibbonGroup_Group As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents BarButtonItem16 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents TBDD_CONNECTIONBindingSource As BindingSource
Friend WithEvents TBDD_CONNECTIONTableAdapter As MyDatasetTableAdapters.TBDD_CONNECTIONTableAdapter

View File

@ -27,8 +27,8 @@ Public Class frmAdministration
XtraTabControl3.SelectedTabPageIndex = 0
_DragDrop = New ClassDragDrop()
'_DragDrop.AddGridView(GridViewGroupInProfile)
'_DragDrop.AddGridView(GridViewGroupNotInProfile)
_DragDrop.AddGridView(GridViewGroupInProfile)
_DragDrop.AddGridView(GridViewGroupNotInProfile)
_DragDrop.AddGridView(GridViewUserInProfile)
_DragDrop.AddGridView(GridViewUserNotInProfile)
@ -215,7 +215,7 @@ Public Class frmAdministration
newUserRow.Email = ""
End Try
newUserRow.ID = row.Item("GUID")
newUserRow.GUID = row.Item("GUID")
MyDataset.TBWH_User.Rows.Add(newUserRow)
' chklbxUserForGroup.Items.Add(New MyListBoxItem() With {.Text = row.Item(1), .ExtraData = row.Item(0)})
Next
@ -236,7 +236,7 @@ Public Class frmAdministration
Dim oNewRow As MyDataset.TBWH_GROUPRow
oNewRow = MyDataset.TBWH_GROUP.NewTBWH_GROUPRow
oNewRow.NAME = row.Item("NAME")
oNewRow.ID = row.Item("GUID")
oNewRow.GUID = row.Item("GUID")
MyDataset.TBWH_GROUP.Rows.Add(oNewRow)
Next
Catch ex As Exception
@ -392,114 +392,6 @@ Public Class frmAdministration
Status_Changed("Fensterzuordnung gelöscht")
End Sub
Private Sub BarButtonItem11_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem11.ItemClick
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 BarButtonItem12_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem12.ItemClick
Try
If PROFILE_IDTextBox.Text = String.Empty Then
Exit Sub
End If
Dim oSelectedRows = GridViewUserInProfile.GetSelectedRows()
For Each oRowHandle As Integer In oSelectedRows
Dim oRow As DataRow = GridViewUserInProfile.GetDataRow(oRowHandle)
Dim oGuid As Integer = oRow.Item("GUID")
Dim del = String.Format("DELETE FROM TBCW_USER_PROFILE WHERE GUID = {0}", oGuid)
If Database.ExecuteNonQuery(del) = False Then
MsgBox("Error while adding user!", MsgBoxStyle.Exclamation)
End If
Next
Refresh_Free_Users(PROFILE_IDTextBox.Text)
Refresh_ProfileData()
GridViewUserInProfile.ClearSelection()
Status_Changed($"{oSelectedRows.Count} Benutzerzuordnungen gelöscht")
Catch ex As Exception
Logger.Error(ex)
MsgBox("Unexpected Error in deleting ProfileUserRelation: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub BarButtonItem13_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem13.ItemClick
Try
Dim oSelectedGroups = GridViewGroupNotInProfile.GetSelectedRows()
For Each oRowHandle In oSelectedGroups
Dim oRow As MyDataset.TBWH_GROUPRow = DirectCast(GridViewGroupNotInProfile.GetRow(oRowHandle), DataRowView).Row
Dim oGroupId As Integer = oRow.ID
Dim oSQL As String = $"INSERT INTO TBCW_GROUP_PROFILE (PROFILE_ID,GROUP_ID) VALUES ({PROFILE_IDTextBox.Text},{oGroupId})"
If Database.ExecuteNonQuery(oSQL) = False Then
MsgBox("Could not insert the Group-Definition....Check the logfile!", MsgBoxStyle.Exclamation)
End If
Next
GridViewGroupNotInProfile.ClearSelection()
Refresh_Free_Groups(PROFILE_IDTextBox.Text)
Refresh_ProfileData()
Status_Changed($"{oSelectedGroups.Count} Gruppen zugeordnet")
Catch ex As Exception
MsgBox("Unexpected Error while adding Group-Rights: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub BarButtonItem14_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem14.ItemClick
Try
Dim oSelectedGroups = GridViewGroupInProfile.GetSelectedRows()
For Each oRowHandle In oSelectedGroups
Dim oRow As MyDataset.VWCW_GROUP_PROFILERow = DirectCast(GridViewGroupInProfile.GetRow(oRowHandle), DataRowView).Row
Dim oGroupId As Integer = oRow.GUID
Dim oSQL As String = $"DELETE FROM TBCW_GROUP_PROFILE WHERE GUID = ({oGroupId})"
If Database.ExecuteNonQuery(oSQL) = False Then
MsgBox("Could not delete the Group-Definition....Check the logfile!", MsgBoxStyle.Exclamation)
End If
Next
GridViewGroupInProfile.ClearSelection()
Refresh_Free_Groups(PROFILE_IDTextBox.Text)
Refresh_ProfileData()
Status_Changed($"{oSelectedGroups.Count} Gruppenzuordnungen gelöscht")
Catch ex As Exception
MsgBox("Unexpected Error in deleting Group-Rights: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub XtraTabControl1_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles XtraTabControl1.SelectedPageChanged, XtraTabControl2.SelectedPageChanged
Dim oTabName As String = e.Page.Name
@ -752,35 +644,6 @@ Public Class frmAdministration
End If
End Sub
Private Sub GridControlUserInProfile_DragDrop(sender As Object, e As DragEventArgs)
'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 SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
If txtRegexTestString.Text.Count = 0 Then
MsgBox("Bitte füllen Sie den Regular Expression Test aus!", MsgBoxStyle.Exclamation, Text)
@ -803,7 +666,115 @@ Public Class frmAdministration
End Sub
Private Sub XtraTabControl3_Click(sender As Object, e As EventArgs) Handles XtraTabControl3.Click
Private Sub GridControlUserNotInProfile_DragDrop(sender As Object, e As DragEventArgs) Handles GridControlUserNotInProfile.DragDrop
Try
If PROFILE_IDTextBox.Text = String.Empty Then
Exit Sub
End If
Dim oSelectedRows = GridViewUserInProfile.GetSelectedRows()
For Each oRowHandle As Integer In oSelectedRows
Dim oRow As DataRow = GridViewUserInProfile.GetDataRow(oRowHandle)
Dim oGuid As Integer = oRow.Item("GUID")
Dim del = String.Format("DELETE FROM TBCW_USER_PROFILE WHERE GUID = {0}", oGuid)
If Database.ExecuteNonQuery(del) = False Then
MsgBox("Error while adding user!", MsgBoxStyle.Exclamation)
End If
Next
Refresh_Free_Users(PROFILE_IDTextBox.Text)
Refresh_ProfileData()
GridViewUserInProfile.ClearSelection()
Status_Changed($"{oSelectedRows.Count} Benutzerzuordnungen gelöscht")
Catch ex As Exception
Logger.Error(ex)
MsgBox("Unexpected Error in deleting ProfileUserRelation: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
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("GUID")
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 XtraTabControl2_DragDrop(sender As Object, e As DragEventArgs) Handles XtraTabControl2.DragDrop
End Sub
Private Sub GridControlGroupNotInProfile_DragDrop(sender As Object, e As DragEventArgs) Handles GridControlGroupNotInProfile.DragDrop
Try
Dim oSelectedGroups = GridViewGroupInProfile.GetSelectedRows()
For Each oRowHandle In oSelectedGroups
Dim oRow As MyDataset.VWCW_GROUP_PROFILERow = DirectCast(GridViewGroupInProfile.GetRow(oRowHandle), DataRowView).Row
Dim oGroupId As Integer = oRow.GUID
Dim oSQL As String = $"DELETE FROM TBCW_GROUP_PROFILE WHERE GUID = ({oGroupId})"
If Database.ExecuteNonQuery(oSQL) = False Then
MsgBox("Could not delete the Group-Definition....Check the logfile!", MsgBoxStyle.Exclamation)
End If
Next
GridViewGroupInProfile.ClearSelection()
Refresh_Free_Groups(PROFILE_IDTextBox.Text)
Refresh_ProfileData()
Status_Changed($"{oSelectedGroups.Count} Gruppenzuordnungen gelöscht")
Catch ex As Exception
MsgBox("Unexpected Error in deleting Group-Rights: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub GridControlGroupInProfile_DragDrop(sender As Object, e As DragEventArgs) Handles GridControlGroupInProfile.DragDrop
Try
Dim oSelectedGroups = GridViewGroupNotInProfile.GetSelectedRows()
For Each oRowHandle In oSelectedGroups
Dim oRow As MyDataset.TBWH_GROUPRow = DirectCast(GridViewGroupNotInProfile.GetRow(oRowHandle), DataRowView).Row
Dim oGroupId As Integer = oRow.GUID
Dim oSQL As String = $"INSERT INTO TBCW_GROUP_PROFILE (PROFILE_ID,GROUP_ID) VALUES ({PROFILE_IDTextBox.Text},{oGroupId})"
If Database.ExecuteNonQuery(oSQL) = False Then
MsgBox("Could not insert the Group-Definition....Check the logfile!", MsgBoxStyle.Exclamation)
End If
Next
GridViewGroupNotInProfile.ClearSelection()
Refresh_Free_Groups(PROFILE_IDTextBox.Text)
Refresh_ProfileData()
Status_Changed($"{oSelectedGroups.Count} Gruppen zugeordnet")
Catch ex As Exception
MsgBox("Unexpected Error while adding Group-Rights: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
End Class

View File

@ -99,7 +99,7 @@
<File Id="DDCommon" Name="DigitalData.GUIs.Common.dll" KeyPath="no" Checksum="yes"/>
<File Id="DDWindows" Name="DigitalData.Modules.Windows.dll" KeyPath="no" Checksum="yes"/>
<File Id="DDPatterns" Name="DigitalData.Modules.Patterns.dll" KeyPath="no" Checksum="yes"/>
<File Id="DDClipboardWatcher" Name="DigitalData.Modules.ClipboardWatcher.dll" KeyPath="no" Checksum="yes"/>
<File Id="DDClipboardWatcher" Name="DigitalData.GUIs.ClipboardWatcher.dll" KeyPath="no" Checksum="yes"/>
<File Id="DDZooFlow" Name="DigitalData.Modules.ZooFlow.dll" KeyPath="no" Checksum="yes"/>
</Component>