ZooFlow: PropertyDialog, ContextMenu, Async Queries in Database

This commit is contained in:
Jonathan Jenne
2020-10-29 16:05:10 +01:00
parent aaafb99275
commit 7750fdf6a5
18 changed files with 433 additions and 114 deletions

View File

@@ -97,7 +97,7 @@ Public Class ClassControlCreator
oSourceSQL = oSourceSQL.Replace("@RESULT_TITLE", pAttributeRow.Item("ATTRIBUTE_TITLE").ToString)
Dim oDTSource As DataTable
'If pAttributeRow.Item("DEPENDING_ATTRIBUTE1") = 0 Then
oDTSource = My.Database_IDB.GetDatatable(oSourceSQL)
oDTSource = My.DatabaseIDB.GetDatatable(oSourceSQL)
'End If
Dim oMinValue As String = ""

View File

@@ -131,8 +131,8 @@ Public Class ClassInit
End If
Dim oConString = My.Database.GetConnectionString(oDatatable.Rows(0).Item("SERVER"), oDatatable.Rows(0).Item("DATENBANK"), oDatatable.Rows(0).Item("USERNAME"), oDatatable.Rows(0).Item("PASSWORD"))
My.Database_IDB = New MSSQLServer(My.LogConfig, oConString)
If My.Database_IDB.DBInitialized = False Then
My.DatabaseIDB = New MSSQLServer(My.LogConfig, oConString)
If My.DatabaseIDB.DBInitialized = False Then
_Logger.Warn("Could not initialize IDB-Database!")
Throw New InitException("Could not initialize IDB-Database!")
End If

View File

@@ -30,7 +30,7 @@ Namespace My
Property MainForm As frmAdministrationZooFlow
Property SearchForm As frmSearchStart
Property Database As MSSQLServer
Property Database_IDB As MSSQLServer
Property DatabaseIDB As MSSQLServer
Property Queries As New ClassQueries
End Module

View File

@@ -1,10 +1,10 @@
Imports DevExpress.LookAndFeel
Imports DevExpress.XtraSplashScreen
Imports DevExpress.XtraSplashScreen
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Messaging
Public Class frmFlowForm
' Constants
Private Const OPACITY_INITIAL = 0
Private Const OPACITY_HIDDEN = 0.65
Private Const OPACITY_SHOWN = 0.85
@@ -28,7 +28,7 @@ Public Class frmFlowForm
InitializeComponent()
' === Hide form initially ===
Opacity = 0
Opacity = OPACITY_INITIAL
End Sub
@@ -78,7 +78,7 @@ Public Class frmFlowForm
' TODO: Clean up
Dim oSQL = $"SELECT * FROM [dbo].[FNIDB_GET_SEARCH_PROFILES] ({My.Application.User.UserId},'{My.Application.User.Language}')"
Dim oDatatable As DataTable = My.Database_IDB.GetDatatable(oSQL)
Dim oDatatable As DataTable = My.DatabaseIDB.GetDatatable(oSQL)
PictureBoxSearch.Visible = False
If Not IsNothing(oDatatable) OrElse oDatatable.Rows.Count > 0 Then
@@ -87,7 +87,7 @@ Public Class frmFlowForm
PictureBoxSearch.Visible = True
End If
My.DTAttributes = My.Database_IDB.GetDatatable("SELECT * FROM TBIDB_ATTRIBUTE")
My.DTAttributes = My.DatabaseIDB.GetDatatable("SELECT * FROM TBIDB_ATTRIBUTE")
End Sub
@@ -138,7 +138,6 @@ Public Class frmFlowForm
End If
End Sub
Public Sub OnEvent(Params As Object)
Logger.Debug("OnEvent called!")
End Sub

View File

@@ -156,7 +156,7 @@ Public Class frmSearchStart
Try
DataLoaded = False
Dim oSQL = $"SELECT * FROM VWIDB_SEARCH_PROFILE_ATTRIBUTES WHERE SEARCH_PROFIL_ID = {PSEARCH_ID} ORDER BY [SEQUENCE]"
Dim oDT As DataTable = My.Database_IDB.GetDatatable(oSQL)
Dim oDT As DataTable = My.DatabaseIDB.GetDatatable(oSQL)
oDTAttributes = Nothing
oDTAttributes = oDT.Clone()
oDT.Select("", "SEQUENCE").CopyToDataTable(oDTAttributes, LoadOption.PreserveChanges)
@@ -691,15 +691,16 @@ Public Class frmSearchStart
Next
Dim oEnvironment As New DigitalData.Modules.ZooFlow.Environment() With {
.User = My.Application.User,
.Modules = My.Application.Modules,
.Database = My.Database,
.Settings = My.Application.Settings
}
Dim oDTSearchResult As DataTable = My.Database_IDB.GetDatatable(oSEARCH_SQL)
.User = My.Application.User,
.Modules = My.Application.Modules,
.Database = My.Database,
.DatabaseIDB = My.DatabaseIDB,
.Settings = My.Application.Settings
}
Dim oDTSearchResult As DataTable = My.DatabaseIDB.GetDatatable(oSEARCH_SQL)
If oDTSearchResult.Rows.Count > 0 Then
Dim oShortGuid = Guid.NewGuid()
Dim oWindowGuid = $"{PSEARCH_ID.ToString}-{My.User.Name}" '{String.Join("-", oShortGuid.ToString)}"
Dim oWindowGuid = $"{PSEARCH_ID.ToString}-{My.User.Name}"
Dim oParams = New DocumentResultParams() With {
.WindowGuid = oWindowGuid,
.Results = New List(Of DocumentResult) From {
@@ -711,9 +712,6 @@ Public Class frmSearchStart
}
Dim oForm As New frmDocumentResultList(My.LogConfig, oEnvironment, oParams)
' AddHandler oForm.FormClosed, AddressOf ProfileResultForm_Closed
' OpenForms.Add(oForm)
oForm.Show()
Else
Display_InfoItem("No results for this searchcombination!", Color.OrangeRed)