Zooflow: Reorganize administration, prepare for user admin section
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
Imports DigitalData.GUIs.ZooFlow.Administration.ClassConstants
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Language
|
||||
|
||||
Public Class ClassDetailForm
|
||||
Inherits BaseClass
|
||||
@@ -8,68 +9,65 @@ Public Class ClassDetailForm
|
||||
|
||||
Public ReadOnly Property DetailDataList As New Dictionary(Of String, DetailData)
|
||||
Public ReadOnly Property DetailSettingsList As New Dictionary(Of String, DetailSettings) From {
|
||||
{PAGE_IDB_ATTRIBUTES, ' This Key will be matched with the Entity Id from the Database
|
||||
New DetailSettings With {
|
||||
{PAGE_IDB_ATTRIBUTES, New DetailSettings With {
|
||||
.GridTitle = "Attribute", ' This will be shown above the Data Grid
|
||||
.NewRecordTitle = "Neues Attribut", ' This will be shown on the "New" Button
|
||||
.[Module] = MODULE_IDB,
|
||||
.Entity = PAGE_IDB_ATTRIBUTES
|
||||
.Entity = PAGE_IDB_ATTRIBUTES ' This Key will be matched with the Entity Id from the Database
|
||||
}},
|
||||
{PAGE_IDB_BUSINESS_ENTITIES,
|
||||
New DetailSettings With {
|
||||
{PAGE_IDB_BUSINESS_ENTITIES, New DetailSettings With {
|
||||
.GridTitle = "BusinessEntity",
|
||||
.NewRecordTitle = "New BusinessEntity",
|
||||
.[Module] = MODULE_IDB,
|
||||
.Entity = PAGE_IDB_BUSINESS_ENTITIES
|
||||
}},
|
||||
{PAGE_IDB_OBJECT_STORES, ' This Key will be matched with the Entity Id from the Database
|
||||
New DetailSettings With {
|
||||
.GridTitle = "Object-Stores", ' This will be shown above the Data Grid
|
||||
.NewRecordTitle = "New Object Store", ' This will be shown on the "New" Button
|
||||
{PAGE_IDB_OBJECT_STORES, New DetailSettings With {
|
||||
.GridTitle = "Object-Stores",
|
||||
.NewRecordTitle = "New Object Store",
|
||||
.[Module] = MODULE_IDB,
|
||||
.Entity = PAGE_IDB_OBJECT_STORES
|
||||
}},
|
||||
{PAGE_META_SOURCE_SQL,
|
||||
New DetailSettings With {
|
||||
{PAGE_META_SOURCE_SQL, New DetailSettings With {
|
||||
.GridTitle = "Source SQL",
|
||||
.NewRecordTitle = "New Source SQL",
|
||||
.[Module] = MODULE_META,
|
||||
.Entity = PAGE_META_SOURCE_SQL
|
||||
}},
|
||||
{PAGE_GI_PROFILES,
|
||||
New DetailSettings With {
|
||||
{PAGE_GI_PROFILES, New DetailSettings With {
|
||||
.GridTitle = "Global Indexer Profile",
|
||||
.NewRecordTitle = "New GLOBIX profile",
|
||||
.[Module] = MODULE_GI,
|
||||
.Entity = PAGE_GI_PROFILES
|
||||
}},
|
||||
{PAGE_CW_PROFILES,
|
||||
New DetailSettings With {
|
||||
{PAGE_CW_PROFILES, New DetailSettings With {
|
||||
.GridTitle = "Clipboard Watcher Profile",
|
||||
.NewRecordTitle = "New CW profile",
|
||||
.[Module] = MODULE_CW,
|
||||
.Entity = PAGE_CW_PROFILES
|
||||
}},
|
||||
{PAGE_IDB_ATTRIBUTE_REL,
|
||||
New DetailSettings With {
|
||||
{PAGE_IDB_ATTRIBUTE_REL, New DetailSettings With {
|
||||
.GridTitle = "Attribute-Relations",
|
||||
.NewRecordTitle = "",
|
||||
.[Module] = MODULE_IDB,
|
||||
.Entity = PAGE_IDB_ATTRIBUTES
|
||||
}},
|
||||
{PAGE_GI_RELATIONS,
|
||||
New DetailSettings With {
|
||||
{PAGE_GI_RELATIONS, New DetailSettings With {
|
||||
.GridTitle = "Globix profile-relations",
|
||||
.NewRecordTitle = "",
|
||||
.[Module] = MODULE_GI,
|
||||
.Entity = PAGE_GI_RELATIONS
|
||||
}},
|
||||
{PAGE_IDB_DOCTYPE_CONFIG,
|
||||
New DetailSettings With {
|
||||
{PAGE_IDB_DOCTYPE_CONFIG, New DetailSettings With {
|
||||
.GridTitle = "Doctype Configuration",
|
||||
.NewRecordTitle = "New Configuration",
|
||||
.[Module] = MODULE_IDB,
|
||||
.Entity = PAGE_IDB_DOCTYPE_CONFIG
|
||||
}},
|
||||
{PAGE_USERS_USERLIST, New DetailSettings With {
|
||||
.GridTitle = "Benutzer Übersicht",
|
||||
.NewRecordTitle = "Neuer Benutzer",
|
||||
.[Module] = MODULE_USERS,
|
||||
.Entity = PAGE_USERS_USERLIST
|
||||
}}
|
||||
}
|
||||
|
||||
@@ -77,6 +75,42 @@ Public Class ClassDetailForm
|
||||
MyBase.New(LogConfig)
|
||||
End Sub
|
||||
|
||||
Public Function LoadData() As Boolean
|
||||
Try
|
||||
Dim oTable As DataTable = My.DatabaseECM.GetDatatable("SELECT * FROM TBZF_ADMIN_SOURCE_SQL WHERE SCOPE = 'OVERVIEW'")
|
||||
DetailDataList.Clear()
|
||||
|
||||
For Each oRow As DataRow In oTable.Rows
|
||||
Dim oCHeck = oRow.Item("ENTITY_TITLE").ToString
|
||||
Dim oItem As New ClassDetailForm.DetailData With {
|
||||
.Guid = CInt(oRow.Item("GUID")),
|
||||
.ParentId = CInt(oRow.Item("PARENT_ID")),
|
||||
.Entity = oRow.Item("ENTITY_TITLE").ToString,
|
||||
.Scope = oRow.Item("SCOPE").ToString,
|
||||
.SQLCommand = oRow.Item("SQL_COMMAND").ToString.Replace("@LANG_CODE", My.Application.User.Language),
|
||||
.PrimaryKey = Utils.NotNull(oRow.Item("PK_COLUMN"), String.Empty)
|
||||
}
|
||||
|
||||
Try
|
||||
oItem.SQLResult = My.DatabaseECM.GetDatatable(oItem.SQLCommand)
|
||||
Catch ex As Exception
|
||||
oItem.SQLResult = Nothing
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
Dim oKey As String = oItem.Entity & "-" & oItem.Scope
|
||||
DetailDataList.Add(oKey, oItem)
|
||||
Next
|
||||
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Handle_OpenDetail(PrimaryKey As Integer, Page As String, IsInsert As Boolean) As Boolean
|
||||
Select Case Page
|
||||
Case PAGE_IDB_ATTRIBUTES
|
||||
@@ -103,17 +137,22 @@ Public Class ClassDetailForm
|
||||
Case PAGE_META_SOURCE_SQL
|
||||
Load_SourceSQL(PrimaryKey, IsInsert)
|
||||
Return True
|
||||
|
||||
Case PAGE_IDB_ATTRIBUTE_REL
|
||||
Dim oForm As New frmAdmin_IDBBERelations
|
||||
oForm.ShowDialog()
|
||||
Return True
|
||||
|
||||
Case PAGE_GI_RELATIONS
|
||||
Dim oForm As New frmAdmin_GlobixRelations
|
||||
oForm.ShowDialog()
|
||||
Return True
|
||||
|
||||
Case PAGE_IDB_DOCTYPE_CONFIG
|
||||
Dim oForm As New frmAdmin_DoctypeConfig(PrimaryKey) With {.IsInsert = IsInsert}
|
||||
oForm.ShowDialog()
|
||||
Return True
|
||||
|
||||
Case Else
|
||||
Return False
|
||||
End Select
|
||||
|
||||
Reference in New Issue
Block a user