ZooFlow: Switch to new database
This commit is contained in:
@@ -32,6 +32,8 @@ Public Class frmAdmin_Start
|
||||
End Sub
|
||||
|
||||
Private Function Handle_LoadPage(Page As String) As Boolean
|
||||
Dim oKey = $"{Page}-OVERVIEW"
|
||||
|
||||
If DetailForm.DetailSettingsList.ContainsKey(Page) Then
|
||||
Dim oNode = DetailForm.DetailSettingsList.Item(Page)
|
||||
CurrentModule = oNode.Module
|
||||
@@ -43,8 +45,11 @@ Public Class frmAdmin_Start
|
||||
Return False
|
||||
End If
|
||||
|
||||
If DetailForm.DetailDataList.ContainsKey(Page) Then
|
||||
Dim oItem = DetailForm.DetailDataList.Item(Page)
|
||||
' This dictionary can contain the same entity multiple times to save
|
||||
' OVERVIEW, INSERT, UPDATE, etc. data records, so we specifically look for the overview key
|
||||
If DetailForm.DetailDataList.ContainsKey(oKey) Then
|
||||
|
||||
Dim oItem = DetailForm.DetailDataList.Item(oKey)
|
||||
Load_GridData(oItem)
|
||||
CurrentItem = oItem
|
||||
Else
|
||||
@@ -68,8 +73,7 @@ Public Class frmAdmin_Start
|
||||
.Entity = oRow.Item("ENTITY_TITLE").ToString,
|
||||
.Scope = oRow.Item("SCOPE").ToString,
|
||||
.SQLCommand = oRow.Item("SQL_COMMAND").ToString,
|
||||
.PrimaryKey = NotNull(oRow.Item("PK_COLUMN"), String.Empty),
|
||||
.ForeignKey = NotNull(oRow.Item("FK_COLUMN"), String.Empty)
|
||||
.PrimaryKey = NotNull(oRow.Item("PK_COLUMN"), String.Empty)
|
||||
}
|
||||
|
||||
Try
|
||||
@@ -79,12 +83,13 @@ Public Class frmAdmin_Start
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
DetailForm.DetailDataList.Add(oItem.Entity, oItem)
|
||||
Dim oKey As String = oItem.Entity & "-" & oItem.Scope
|
||||
DetailForm.DetailDataList.Add(oKey, oItem)
|
||||
Next
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
ShowErrorMessage(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user