Zooflow: Finish user relations

This commit is contained in:
Jonathan Jenne
2022-03-10 15:15:11 +01:00
parent 8ace2fe11f
commit 721732c0af
13 changed files with 171 additions and 70 deletions

View File

@@ -49,12 +49,14 @@ Public Class ClassDetailForm
{PAGE_IDB_ATTRIBUTE_REL, New DetailSettings With {
.GridTitle = "Attribute-Relations",
.[Module] = MODULE_IDB,
.Entity = PAGE_IDB_ATTRIBUTES
.Entity = PAGE_IDB_ATTRIBUTES,
.IsRelationPage = True
}},
{PAGE_GI_RELATIONS, New DetailSettings With {
.GridTitle = "Globix profile-relations",
.[Module] = MODULE_GI,
.Entity = PAGE_GI_RELATIONS
.Entity = PAGE_GI_RELATIONS,
.IsRelationPage = True
}},
{PAGE_IDB_DOCTYPE_CONFIG, New DetailSettings With {
.GridTitle = "Detail Doctype Configuration",
@@ -70,7 +72,8 @@ Public Class ClassDetailForm
{PAGE_IDB_DOCTYPE_BE, New DetailSettings With {
.GridTitle = "Doctype BE Relations",
.[Module] = MODULE_IDB,
.Entity = PAGE_IDB_DOCTYPE_BE
.Entity = PAGE_IDB_DOCTYPE_BE,
.IsRelationPage = True
}},
{PAGE_USERS_USERLIST, New DetailSettings With {
.GridTitle = "User Overview",
@@ -87,7 +90,8 @@ Public Class ClassDetailForm
{PAGE_USERS_USER_GROUP_RELATIONS, New DetailSettings With {
.GridTitle = "User Group Relations",
.[Module] = MODULE_USERS,
.Entity = PAGE_USERS_USER_GROUP_RELATIONS
.Entity = PAGE_USERS_USER_GROUP_RELATIONS,
.IsRelationPage = True
}}
}
@@ -194,11 +198,21 @@ Public Class ClassDetailForm
End Try
End Function
Public Function TestPageIsRelation(pPageName As String) As Boolean
Return DetailSettingsList.Any(Function(page) page.Key = pPageName And page.Value.IsRelationPage = True)
End Function
Public Class DetailSettings
Public Property GridTitle As String
Public Property [Module] As String
Public Property Entity As String
''' <summary>
''' This makes sure that the page can be opened even if there are no entries
''' </summary>
''' <returns></returns>
Public Property IsRelationPage As Boolean = False
''' <summary>
''' If this is empty, the button "New Record will be hidden"
''' </summary>

View File

@@ -457,11 +457,12 @@ Partial Class frmAdmin_User
Me.Controls.Add(Me.LayoutControl1)
Me.Controls.Add(Me.RibbonStatusBar1)
Me.Controls.Add(Me.RibbonControl1)
Me.IconOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.actions_user
Me.KeyPreview = True
Me.Name = "frmAdmin_User"
Me.Ribbon = Me.RibbonControl1
Me.StatusBar = Me.RibbonStatusBar1
Me.Text = "Benutzer bearbeiten"
Me.Text = "Benutzer bearbeiten - Zooflow"
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.DSDD_Stammdaten, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.TBDD_USERBindingSource, System.ComponentModel.ISupportInitialize).EndInit()

View File

@@ -1,5 +1,5 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmAdmin_ImportUser
Partial Class frmAdmin_UserImport
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
@@ -247,7 +247,7 @@ Partial Class frmAdmin_ImportUser
'
Me.SplashScreenManager1.ClosingDelay = 500
'
'frmAdmin_ImportUser
'frmAdmin_UserImport
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
@@ -256,10 +256,10 @@ Partial Class frmAdmin_ImportUser
Me.Controls.Add(Me.RibbonStatusBar1)
Me.Controls.Add(Me.RibbonControl1)
Me.IconOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.text
Me.Name = "frmAdmin_ImportUser"
Me.Name = "frmAdmin_UserImport"
Me.Ribbon = Me.RibbonControl1
Me.StatusBar = Me.RibbonStatusBar1
Me.Text = "Active Directory Import"
Me.Text = "Active Directory Import - Zooflow"
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainerControl1.Panel1.ResumeLayout(False)

View File

@@ -4,7 +4,7 @@ Imports DigitalData.Modules.Logging
Imports DigitalData.GUIs.Common
Imports DevExpress.XtraGrid.Views.Grid
Public Class frmAdmin_ImportUser
Public Class frmAdmin_UserImport
Private ReadOnly Logger As Logger = My.LogConfig.GetLogger
Private ActiveDirectory As ActiveDirectoryInterface
@@ -56,7 +56,7 @@ Public Class frmAdmin_ImportUser
End Sub
Private Sub btnImportUsers_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnImportUsers.ItemClick
Dim oForm As New frmAdmin_ImportUser()
Dim oForm As New frmAdmin_UserImport()
oForm.ShowDialog()
End Sub

View File

@@ -424,22 +424,21 @@ Partial Class frmAdmin_Start
Me.TreeListMenu.AppendNode(New Object() {"Attribute"}, 0, 2, 2, -1, "IDB_ATTRIBUTES")
Me.TreeListMenu.AppendNode(New Object() {"Relation Business Entity"}, 1, 9, 9, -1, "ATTRIBUTE_RELATIONS")
Me.TreeListMenu.AppendNode(New Object() {"Business Entities"}, 0, 1, 1, -1, "IDB_BUSINESS_ENTITIES")
Me.TreeListMenu.AppendNode(New Object() {Nothing}, 3)
Me.TreeListMenu.AppendNode(New Object() {"Doctypes"}, 0, 10, 10, -1, "DOCTYPE_DEF")
Me.TreeListMenu.AppendNode(New Object() {"Configurations"}, 5, 10, 10, -1, "IDB_DOCTYPE_CONFIG")
Me.TreeListMenu.AppendNode(New Object() {"Relation Business Entity"}, 5, 9, 9, -1, "DOCTYPE_BE")
Me.TreeListMenu.AppendNode(New Object() {"Configurations"}, 4, 10, 10, -1, "IDB_DOCTYPE_CONFIG")
Me.TreeListMenu.AppendNode(New Object() {"Relation Business Entity"}, 4, 9, 9, -1, "DOCTYPE_BE")
Me.TreeListMenu.AppendNode(New Object() {"Object Stores"}, 0, "IDB_OBJECT_STORES")
Me.TreeListMenu.AppendNode(New Object() {"Global Indexer"}, -1, 6, 6, -1, "")
Me.TreeListMenu.AppendNode(New Object() {"Profiles"}, 9, 4, 4, -1, "GI_PROFILES")
Me.TreeListMenu.AppendNode(New Object() {"Profile Relations"}, 10, 9, 9, -1, "GI_RELATIONS")
Me.TreeListMenu.AppendNode(New Object() {"Profiles"}, 8, 4, 4, -1, "GI_PROFILES")
Me.TreeListMenu.AppendNode(New Object() {"Profile Relations"}, 9, 9, 9, -1, "GI_RELATIONS")
Me.TreeListMenu.AppendNode(New Object() {"Clipboard Watcher"}, -1, 7, 7, -1, "")
Me.TreeListMenu.AppendNode(New Object() {"Profiles"}, 12, 4, 4, -1, "CW_PROFILES")
Me.TreeListMenu.AppendNode(New Object() {"Profiles"}, 11, 4, 4, -1, "CW_PROFILES")
Me.TreeListMenu.AppendNode(New Object() {"Administration"}, -1)
Me.TreeListMenu.AppendNode(New Object() {"Source SQL"}, 14, 3, 3, -1, "META_SOURCE_SQL")
Me.TreeListMenu.AppendNode(New Object() {"Source SQL"}, 13, 3, 3, -1, "META_SOURCE_SQL")
Me.TreeListMenu.AppendNode(New Object() {"User Management"}, -1, 11, 11, -1)
Me.TreeListMenu.AppendNode(New Object() {"User List"}, 16, 5, 5, -1, "USERS_USERLIST")
Me.TreeListMenu.AppendNode(New Object() {"Group List"}, 16, 12, 12, -1, "USERS_GROUPLIST")
Me.TreeListMenu.AppendNode(New Object() {"User To Group Relations"}, 16, "USERS_USER_GROUP_RELATIONS")
Me.TreeListMenu.AppendNode(New Object() {"User List"}, 15, 5, 5, -1, "USERS_USERLIST")
Me.TreeListMenu.AppendNode(New Object() {"Group List"}, 15, 12, 12, -1, "USERS_GROUPLIST")
Me.TreeListMenu.AppendNode(New Object() {"User Relations"}, 17, 9, 9, -1, "USERS_USER_GROUP_RELATIONS")
Me.TreeListMenu.EndUnboundLoad()
Me.TreeListMenu.OptionsBehavior.Editable = False
Me.TreeListMenu.OptionsView.ShowColumns = False

View File

@@ -8,6 +8,7 @@ Imports DigitalData.Modules.Language.Utils
Imports DigitalData.GUIs.ZooFlow.Administration.ClassConstants
Imports DevExpress.XtraGrid
Imports DevExpress.XtraBars
Imports DigitalData.Modules.Language
Public Class frmAdmin_Start
Private CurrentModule As String
@@ -222,8 +223,13 @@ Public Class frmAdmin_Start
Try
Dim oView As GridView = ViewMain
Dim oRowView As DataRowView = oView.GetRow(RowHandle)
If oRowView Is Nothing Then
Return Nothing
End If
Dim oItem As ClassDetailForm.DetailData = CurrentItem
Dim oGuid = oRowView.Row.Item(oItem.PrimaryKey)
Dim oGuid = oRowView.Row.ItemEx(oItem.PrimaryKey, -1)
Return oGuid
Catch ex As Exception
@@ -256,13 +262,15 @@ Public Class frmAdmin_Start
Private Sub btnEditRecord_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnEditRecord.ItemClick
Try
If ViewMain.FocusedRowHandle = GridControl.InvalidRowHandle Then
Dim oIsRelationPage = DetailForm.TestPageIsRelation(CurrentPage)
If ViewMain.FocusedRowHandle = GridControl.InvalidRowHandle And Not oIsRelationPage Then
Exit Sub
End If
Dim oPrimaryKey = Get_PrimaryKey(ViewMain.FocusedRowHandle)
If oPrimaryKey IsNot Nothing Or CurrentPage = PAGE_GI_RELATIONS Then
If oPrimaryKey IsNot Nothing Or oIsRelationPage Then
DetailForm.Handle_OpenDetail(oPrimaryKey, CurrentPage, False)
End If
Catch ex As Exception
@@ -271,7 +279,7 @@ Public Class frmAdmin_Start
End Sub
Private Sub BarButtonItem27_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem27.ItemClick
Dim oForm As New frmAdmin_ImportUser()
Dim oForm As New frmAdmin_UserImport()
oForm.ShowDialog()
End Sub