Monitor: work on init
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user