Zooflow: Remove ClassDataASorDB
This commit is contained in:
parent
6a182d60c8
commit
1dd8639835
@ -10,20 +10,18 @@ Public Class ClassIDBData
|
||||
''' <param name="BusinessEntity">Title of Business Entity</param>
|
||||
''' <returns>Array with all Indices</returns>
|
||||
Private _Logger As Logger
|
||||
Private _DataASorDB As ClassDataASorDB
|
||||
Private _Database As DatabaseWithFallback
|
||||
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
_Logger = LogConfig.GetLogger
|
||||
_Database = New DatabaseWithFallback(LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
|
||||
|
||||
_DataASorDB = New ClassDataASorDB(LogConfig)
|
||||
Dim oSQL = $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE LANG_ID = {My.Application.User.LanguageId}"
|
||||
|
||||
DTVWIDB_BE_ATTRIBUTE = _Database.GetDatatable("VWIDB_BE_ATTRIBUTE", oSQL, DatabaseType.IDB, $"LANG_ID = {My.Application.User.LanguageId}")
|
||||
'DTVWIDB_BE_ATTRIBUTE = _DataASorDB.GetDatatable("IDB", oSQL, "VWIDB_BE_ATTRIBUTE", $"LANG_ID = {My.Application.User.LanguageID}")
|
||||
End Sub
|
||||
|
||||
Public IDBSystemIndices As List(Of String)
|
||||
|
||||
Public Function GetIndicesByBE(ByVal pBusinessEntity As String) As List(Of String)
|
||||
Try
|
||||
IDBSystemIndices = New List(Of String) From {
|
||||
|
||||
@ -18,7 +18,6 @@ Public Class ClassInit
|
||||
Inherits Base.BaseClass
|
||||
|
||||
Private ReadOnly _MainForm As frmFlowForm
|
||||
Private ReadOnly _DataASorDB As ClassDataASorDB
|
||||
Private ReadOnly _Database As DatabaseWithFallback
|
||||
Private _Loader As ClassInitLoader
|
||||
|
||||
@ -27,9 +26,6 @@ Public Class ClassInit
|
||||
Public Sub New(LogConfig As LogConfig, ParentForm As frmFlowForm)
|
||||
MyBase.New(LogConfig)
|
||||
_MainForm = ParentForm
|
||||
|
||||
'TODO: Remove when Globix uses DatabaseWithFallback
|
||||
clsDataASorDB = New ClassDataASorDB(LogConfig)
|
||||
End Sub
|
||||
|
||||
Public Sub InitializeApplication()
|
||||
|
||||
@ -129,7 +129,7 @@ Public Class ClassValidator
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Function GetControlValues(pPanel As Panel)
|
||||
Function GetControlValues(pPanel As Panel) As List(Of UserAttributeValue)
|
||||
Dim oAttributeValues As New List(Of UserAttributeValue)
|
||||
|
||||
For Each oControl As Control In pPanel.Controls
|
||||
|
||||
@ -99,16 +99,16 @@ Public Class frmGlobixBasicConfig
|
||||
|
||||
Private Sub frmGlobixBasicConfig_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Logger = My.LogConfig.GetLogger()
|
||||
clsFW = New ClassFolderwatcher()
|
||||
clsFW = New ClassFolderwatcher(My.LogConfig)
|
||||
Try
|
||||
oReload = True
|
||||
Dim oFolderwatch = My.DatabaseECM.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & My.Application.User.UserId)
|
||||
If Not oFolderwatch Is Nothing Then
|
||||
If oFolderwatch IsNot Nothing Then
|
||||
My.Application.Globix.CurrentFolderWatchPath = oFolderwatch
|
||||
End If
|
||||
Me.txtFolderWatch.Text = My.Application.Globix.CurrentFolderWatchPath
|
||||
Dim oSCANFolderwatch = My.DatabaseECM.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & My.Application.User.UserId)
|
||||
If Not oSCANFolderwatch Is Nothing Then
|
||||
If oSCANFolderwatch IsNot Nothing Then
|
||||
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = oSCANFolderwatch
|
||||
End If
|
||||
Me.txtFolderWatch.Text = My.Application.Globix.CurrentFolderWatchPath
|
||||
|
||||
@ -35,7 +35,9 @@ Module ModuleHelpers
|
||||
Dim connectionString As String = ""
|
||||
Try
|
||||
Dim oSQL = "SELECT * FROM TBDD_CONNECTION WHERE GUID = " & id
|
||||
Dim DTConnection As DataTable = clsDataASorDB.GetDatatable("DD_ECM", oSQL, "TBDD_CONNECTION", "GUID = " & id, "")
|
||||
Dim DTConnection As DataTable = My.Database.GetDatatable("TBDD_CONNECTION", oSQL, Modules.EDMI.API.Constants.DatabaseType.ECM, $"GUID = {id}")
|
||||
|
||||
|
||||
If DTConnection.Rows.Count = 1 Then
|
||||
Dim CSType = DTConnection.Rows(0).Item("SQL_PROVIDER").ToString.ToUpper
|
||||
Select Case CSType
|
||||
|
||||
@ -22,7 +22,6 @@ Public Class frmFlowForm
|
||||
|
||||
' Common Helpers Classes
|
||||
Private Init As ClassInit
|
||||
Private AppServerOrDB As ClassDataASorDB
|
||||
Private FileClass As Filesystem.File
|
||||
|
||||
' Globix Helper Classes
|
||||
@ -69,10 +68,6 @@ Public Class frmFlowForm
|
||||
' === Show Splash Screen ===
|
||||
SplashScreenManager.ShowForm(Me, GetType(frmSplash), False, False)
|
||||
|
||||
' === Initialize AppServer Database Connection with Failover
|
||||
AppServerOrDB = New ClassDataASorDB(My.LogConfig)
|
||||
|
||||
|
||||
' === Initialization ===
|
||||
Init = New ClassInit(My.LogConfig, Me)
|
||||
AddHandler Init.Completed, AddressOf Init_Completed
|
||||
@ -182,7 +177,7 @@ Public Class frmFlowForm
|
||||
End If
|
||||
|
||||
oSQL = "SELECT * FROM TBIDB_ATTRIBUTE"
|
||||
My.Tables.DTIDB_ATTRIBUTE = AppServerOrDB.GetDatatable("IDB", oSQL, "TBIDB_ATTRIBUTE", "", "")
|
||||
My.Tables.DTIDB_ATTRIBUTE = My.Database.GetDatatable("TBIDB_ATTRIBUTE", "SELECT * FROM TBIDB_ATTRIBUTE", EDMI.API.Constants.DatabaseType.IDB)
|
||||
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
@ -190,8 +185,7 @@ Public Class frmFlowForm
|
||||
Public Sub Init_Folderwatch()
|
||||
Try
|
||||
Dim oSql As String = "SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & My.Application.User.UserId
|
||||
|
||||
Dim oDT As DataTable = AppServerOrDB.GetDatatable("DD_ECM", oSql, "TBGI_FOLDERWATCH_USER", $"FOLDER_TYPE = 'DEFAULT' AND USER_ID = {My.Application.User.UserId}")
|
||||
Dim oDT = My.Database.GetDatatable("TBGI_FOLDERWATCH_USER", oSql, EDMI.API.Constants.DatabaseType.ECM, $"FOLDER_TYPE = 'DEFAULT' AND USER_ID = {My.Application.User.UserId}")
|
||||
|
||||
If oDT.Rows.Count = 0 Then
|
||||
'Throw New ApplicationException("No Default Path configured for User!")
|
||||
|
||||
@ -4,6 +4,7 @@ Imports DigitalData.Modules.EDMI.API
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports DigitalData.Modules.EDMI.API.Client
|
||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||
|
||||
Public Class frmtest
|
||||
|
||||
@ -36,7 +37,7 @@ Public Class frmtest
|
||||
|
||||
|
||||
Private Async Sub btnImportFile_Click_(sender As Object, e As EventArgs) Handles btnImportFile.Click
|
||||
Dim oObjectId As Long = Await My.Application.Service.Client.ImportFileAsync(
|
||||
Dim oResponse As ImportFileResponse = Await My.Application.Service.Client.ImportFileAsync(
|
||||
txtFile2Import.Text,
|
||||
txtProfileId.Text,
|
||||
New List(Of EDMIServiceReference.UserAttributeValue) From {
|
||||
@ -50,11 +51,13 @@ Public Class frmtest
|
||||
"DEFAULT"
|
||||
)
|
||||
|
||||
If oObjectId <> INVALID_OBEJCT_ID Then
|
||||
If oResponse.OK Then
|
||||
MsgBox("File Imported!", MsgBoxStyle.Information, Text)
|
||||
txtIDB_OBJ_ID.Text = oResponse.ObjectId
|
||||
Else
|
||||
MsgBox("File was not imported. Check the server logs!")
|
||||
MsgBox("File was not imported. Check the server logs!", MsgBoxStyle.Critical, Text)
|
||||
End If
|
||||
txtIDB_OBJ_ID.Text = oObjectId
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@ -12,6 +12,5 @@ Module modCurrent
|
||||
Public Property NI_TITLE As String = ""
|
||||
Public Property NI_MESSAGE As String = ""
|
||||
Public Property NI_TYPE As String = "INFO"
|
||||
Public Property clsDataASorDB As ClassDataASorDB
|
||||
Public Property GLOBIX_JUMP_DOCTYPE_ID As Integer
|
||||
End Module
|
||||
|
||||
@ -48,7 +48,7 @@ Public Class DatabaseWithFallback
|
||||
End Try
|
||||
|
||||
If oTableResult Is Nothing OrElse oTableResult.OK = False Then
|
||||
_Logger.Warn("Datatable [{0}] could not be fetched from AppServer Cache. Falling back to direct Database Access.")
|
||||
_Logger.Warn("Datatable [{0}] could not be fetched from AppServer Cache. Falling back to direct Database Access.", pDataTableName)
|
||||
Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType)
|
||||
End If
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user