Zooflow: MASSIVE Clean up in Globix Module
This commit is contained in:
@@ -3,11 +3,14 @@ Imports DigitalData.Modules.Logging
|
||||
Imports Oracle.ManagedDataAccess.Client
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Modules.Patterns
|
||||
Imports DigitalData.GUIs.ZooFlow.Globix.Models
|
||||
|
||||
Public Class GlobixControls
|
||||
Private Property Form As frmGlobix_Index
|
||||
Private Property Panel As Panel
|
||||
Private Patterns As GlobixPatterns
|
||||
Private ReadOnly DocType As DocType
|
||||
Private Property Patterns2 As Patterns2
|
||||
|
||||
Public Class ControlMeta
|
||||
Public Property IndexName As String
|
||||
@@ -15,11 +18,12 @@ Public Class GlobixControls
|
||||
Public Property MultipleValues As Boolean = False
|
||||
End Class
|
||||
Private _Logger As Logger
|
||||
Public Sub New(LogConfig As LogConfig, Panel As Panel, Form As frmGlobix_Index)
|
||||
Public Sub New(LogConfig As LogConfig, Panel As Panel, Form As frmGlobix_Index, pDocType As DocType)
|
||||
_Logger = LogConfig.GetLogger
|
||||
Me.Form = Form
|
||||
Me.Panel = Panel
|
||||
Patterns = New GlobixPatterns(LogConfig)
|
||||
DocType = pDocType
|
||||
Patterns2 = New Patterns2(LogConfig)
|
||||
End Sub
|
||||
|
||||
Public Function AddCheckBox(indexname As String, y As Integer, vorbelegung As String, caption As String)
|
||||
@@ -106,7 +110,7 @@ Public Class GlobixControls
|
||||
If oConnectionString IsNot Nothing And oSql.Length > 0 And SQLSuggestion = True Then
|
||||
_Logger.Debug("Connection String (redacted): [{0}]", oConnectionString.Substring(0, 30))
|
||||
|
||||
If Patterns.HasComplexPatterns(oSql) Then
|
||||
If Patterns2.HasComplexPatterns(oSql) Then
|
||||
_Logger.Debug("sql enthält Platzhalter und wird erst während der Laufzeit gefüllt!", False)
|
||||
Else
|
||||
Dim oDatatable = My.DatabaseECM.GetDatatableWithConnection(oSql, oConnectionString)
|
||||
@@ -189,7 +193,7 @@ Public Class GlobixControls
|
||||
Private Sub Get_NextComboBoxResults(cmb As ComboBox)
|
||||
Try
|
||||
Dim indexname = cmb.Name.Replace("cmb", "")
|
||||
Dim sql = "SELECT GUID,NAME,SQL_RESULT FROM TBDD_INDEX_MAN where SUGGESTION = 1 AND SQL_RESULT like '%@" & indexname & "%' and DOK_ID = " & My.Application.Globix.CURRENT_DOCTYPE_ID & " ORDER BY SEQUENCE"
|
||||
Dim sql = "SELECT GUID,NAME,SQL_RESULT FROM TBDD_INDEX_MAN where SUGGESTION = 1 AND SQL_RESULT like '%@" & indexname & "%' and DOK_ID = " & DocType.Guid & " ORDER BY SEQUENCE"
|
||||
Dim DT As DataTable = My.DatabaseECM.GetDatatable(sql)
|
||||
If Not IsNothing(DT) Then
|
||||
If DT.Rows.Count > 0 Then
|
||||
@@ -417,10 +421,9 @@ Public Class GlobixControls
|
||||
Continue For
|
||||
End If
|
||||
|
||||
oControlSql = Patterns.ReplaceUserValues(oControlSql, My.Application.Globix.CURRENT_DOCTYPE_ID)
|
||||
oControlSql = Patterns.ReplaceInternalValues(oControlSql)
|
||||
oControlSql = Patterns.ReplaceControlValues(oControlSql, Panel)
|
||||
|
||||
oControlSql = Patterns2.ReplaceInternalValues(oControlSql)
|
||||
oControlSql = Patterns2.ReplaceUserValues(oControlSql, My.Application.User)
|
||||
oControlSql = Patterns2.ReplaceControlValues(oControlSql, Panel)
|
||||
|
||||
_Logger.Debug("SQL After Preparing: [{0}]", oControlSql)
|
||||
_Logger.Debug("Setting new value for [{0}]", oControlName)
|
||||
|
||||
Reference in New Issue
Block a user