Find control Name
This commit is contained in:
@@ -7,6 +7,9 @@ Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DD_LIB_Standards
|
||||
Imports DevExpress.XtraTab
|
||||
Imports DD_Clipboard_Watcher.ClassProfileFilter
|
||||
Imports DigitalData.Modules
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Database.Constants
|
||||
|
||||
Public Class frmResultDoc
|
||||
Implements IResultForm
|
||||
@@ -102,11 +105,12 @@ Public Class frmResultDoc
|
||||
For Each oRow As DataRow In oSearchesDataTable.Rows
|
||||
Dim oProfileId As Integer = oRow.Item("PROFILE_ID")
|
||||
Dim oTabTitle As String = oRow.Item("TAB_TITLE")
|
||||
Dim oConnectionId As Integer = oRow.Item("CONN_ID")
|
||||
|
||||
oSQL = oRow.Item("SQL_COMMAND")
|
||||
oSQL = clsPatterns.ReplaceAllValues(oSQL, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL, USER_ID, oProfileId)
|
||||
|
||||
Dim oDatatable As DataTable = Database.GetDatatable(oSQL)
|
||||
Dim oDatatable As DataTable = GetDatatable(oSQL, oConnectionId)
|
||||
oDocSearches.Add(New DocSearch() With {
|
||||
.DataTable = oDatatable,
|
||||
.ProfileId = oProfileId,
|
||||
@@ -120,6 +124,33 @@ Public Class frmResultDoc
|
||||
Return oDocSearches
|
||||
End Function
|
||||
|
||||
Private Function GetDatatable(SqlCommand As String, ConnectionId As Integer)
|
||||
Try
|
||||
Dim oRow As MyDataset.TBDD_CONNECTIONRow = DT_CONNECTIONS.AsEnumerable().
|
||||
Where(Function(r) r.GUID = ConnectionId).
|
||||
FirstOrDefault()
|
||||
|
||||
Dim oConnectionType As String = oRow.SQL_PROVIDER
|
||||
|
||||
Select Case oRow.SQL_PROVIDER
|
||||
Case PROVIDER_MSSQL
|
||||
Dim oSQL As New MSSQLServer(LogConfig, oRow.SERVER, oRow.DATENBANK, oRow.USERNAME, oRow.PASSWORD)
|
||||
Return oSQL.GetDatatable(SqlCommand)
|
||||
|
||||
Case PROVIDER_ODBC
|
||||
Dim oODBC As New ODBC(LogConfig, oRow.SERVER, oRow.USERNAME, oRow.PASSWORD)
|
||||
Return oODBC.GetDatatable(SqlCommand)
|
||||
|
||||
Case Else
|
||||
Dim oOracle As New Database.Oracle(LogConfig, oRow.SERVER, oRow.DATENBANK, oRow.USERNAME, oRow.PASSWORD)
|
||||
Return oOracle.GetDatatable(SqlCommand)
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Sub RefreshTabDoc(ProfileId As Integer, Datatable As DataTable, TabIndex As Integer, TabCaption As String)
|
||||
Try
|
||||
Dim myGridControl As GridControl = GridControlDocSearch1
|
||||
|
||||
Reference in New Issue
Block a user