Monitor: work on init

This commit is contained in:
Jonathan Jenne
2021-05-17 10:39:15 +02:00
parent 4e56d474fa
commit 4c78e6e5a7
3 changed files with 105 additions and 42 deletions

View File

@@ -12,6 +12,7 @@ Public Class frmStart
Try
LogConfig = New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing, "Digital Data", "Monitor")
ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath)
Init(LogConfig)
If ConfigManager.Config.ConnectionString = String.Empty Then
Dim oSQLConfig As New frmSQLConfig(LogConfig)
@@ -26,8 +27,35 @@ Public Class frmStart
End If
Database = New MSSQLServer(LogConfig, ConfigManager.Config.ConnectionString)
Catch ex As Exception
ShowErrorMessage(ex)
End Try
End Sub
Private Sub buttonSearch_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles buttonSearch.ItemClick
InitTreeList()
LoadData()
End Sub
Private Function LoadData() As Boolean
Try
Dim oSQL As String = "EXEC PRDD_MONITORING_GET_TREEVIEW_RESULT 'TYPE1','sdsdd',2"
Dim oTable As DataTable = Database.GetDatatable(oSQL)
TreeListResults.DataSource = oTable
Return True
Catch ex As Exception
ShowErrorMessage(ex)
Return False
End Try
End Function
Private Sub InitTreeList()
TreeListResults.KeyFieldName = "GUID"
TreeListResults.ParentFieldName = "PARENT_ID"
End Sub
End Class