SQL Connection cleanup

This commit is contained in:
Jonathan Jenne 2022-08-09 15:18:47 +02:00
parent 8c76b53273
commit 7c9160a270
14 changed files with 144 additions and 140 deletions

View File

@ -117,21 +117,14 @@ Public Class ClassInit
INDEX_DMS_ERSTELLT = CONFIG.Config.IndexDmsErstellt
INDEX_DMS_ERSTELLT_ZEIT = CONFIG.Config.IndexDmsErstelltZeit
USER_MANAGER_PATH = CONFIG.Config.UserManagerPath
USER_CONFIG_DEBUG = CONFIG.Config.DEBUG
If USER_CONFIG_DEBUG = True Then
DEBUG = True
LOGCONFIG.Debug = True
End If
TEST_MODE = CONFIG.Config.TestMode
Catch ex As Exception
LOGGER.Error(ex)
End Try
'Settings_Load()
End Sub
Private Function DecryptConnectionString(EncryptedConnectionString As String) As String

View File

@ -12,22 +12,27 @@ Public Class ClassSQLEditor
End Function
Public Overrides Function EditValue(context As ITypeDescriptorContext, provider As IServiceProvider, value As Object) As Object
Dim svc As IWindowsFormsEditorService = TryCast(provider.GetService(GetType(IWindowsFormsEditorService)), IWindowsFormsEditorService)
Dim SQLSTring As String = DirectCast(value, SQLValue).Value
Dim oService As IWindowsFormsEditorService = TryCast(provider.GetService(GetType(IWindowsFormsEditorService)), IWindowsFormsEditorService)
If svc IsNot Nothing AndAlso SQLSTring IsNot Nothing Then
Dim oValueObject = DirectCast(value, SQLValue)
Dim oSQLString As String = oValueObject.Value
Dim oSQLConnection As Integer = oValueObject.ConnectionId
If oService IsNot Nothing AndAlso oSQLString IsNot Nothing Then
'CURRENT_DESIGN_TYPE = "INPUT_INDEX"
Using oForm As New frmSQLEditor(LOGCONFIG, DatabaseECM)
oForm.SQLCommand = SQLSTring
oForm.SQLCommand = oSQLString
oForm.SQLConnection = oSQLConnection
oForm.PlaceholdersManualPrefix = "CTRL"
oForm.PlaceholdersManualTitle = "Controls"
oForm.PlaceholdersManual = CURRENT_CONTROL_NAME_LIST.ToDictionary(Function(name) name, Function(name) name)
oForm.PlaceholdersManual = CURRENT_CONTROL_NAME_LIST.
ToDictionary(Function(name) name, Function(name) name)
If svc.ShowDialog(oForm) = DialogResult.OK Then
Dim sql As New SQLValue(oForm.SQLCommand)
CURRENT_SQL_CON = oForm.SQLConnection
CURRENT_CONN_ID = oForm.SQLConnection
If oService.ShowDialog(oForm) = DialogResult.OK Then
Dim sql As New SQLValue(oForm.SQLCommand, oForm.SQLConnection)
' CURRENT_CONN_ID_FINAL_INDEX = oForm.SQLConnection
' CURRENT_CONN_ID = oForm.SQLConnection
value = sql
End If
End Using

View File

@ -7,12 +7,18 @@ Imports System.Drawing.Design
<TypeConverter(GetType(SQLTypeConverter))>
Public Class SQLValue
Public Property Value As String
Public Property ConnectionId As Integer
Public Sub New()
Me.Value = ""
Value = ""
End Sub
Public Sub New(value As String)
Me.Value = value
End Sub
Public Sub New(pValue As String, pConnectionId As Integer)
Value = pValue
ConnectionId = pConnectionId
End Sub
End Class

View File

@ -84,10 +84,12 @@ Public Module ModuleControlProperties
Private _index_type As String
Private _sql_command As String
Friend _sql_connection As Integer = 0
Private _Override_SQL As String
Private _Enable_SQL As String
Private _Enable_SQL_ONLOAD As String
Private _default_value
Friend _set_control_data As String
<Category(ClassConstants.CAT_BEHAVIOUR)>
Public Property Active() As Boolean
@ -122,10 +124,23 @@ Public Module ModuleControlProperties
<Category(ClassConstants.CAT_DATA)>
Public Property SQLCommand() As SQLValue
Get
Return New SQLValue(NotNull(_sql_command, ""))
Return New SQLValue(NotNull(_sql_command, ""), _sql_connection)
End Get
Set(ByVal value As SQLValue)
_sql_command = value.Value
SQLConnection = value.ConnectionId
End Set
End Property
<DisplayName("SQL Connection")>
<Category(ClassConstants.CAT_INFORMATION)>
<[ReadOnly](True)>
Public Property SQLConnection() As Integer
Get
Return _sql_connection
End Get
Set(value As Integer)
_sql_connection = value
End Set
End Property
@ -133,10 +148,11 @@ Public Module ModuleControlProperties
<Category(ClassConstants.CAT_VALIDATION)>
Public Property Override_SQL() As SQLValue
Get
Return New SQLValue(NotNull(_Override_SQL, ""))
Return New SQLValue(NotNull(_Override_SQL, ""), _sql_connection)
End Get
Set(ByVal value As SQLValue)
_Override_SQL = value.Value
SQLConnection = value.ConnectionId
End Set
End Property
@ -144,10 +160,11 @@ Public Module ModuleControlProperties
<Category(ClassConstants.CAT_BEHAVIOUR)>
Public Property Enable_SQL() As SQLValue
Get
Return New SQLValue(NotNull(_Enable_SQL, ""))
Return New SQLValue(NotNull(_Enable_SQL, ""), _sql_connection)
End Get
Set(ByVal value As SQLValue)
_Enable_SQL = value.Value
SQLConnection = value.ConnectionId
End Set
End Property
@ -155,10 +172,11 @@ Public Module ModuleControlProperties
<Category(ClassConstants.CAT_BEHAVIOUR)>
Public Property Enable_SQL_OnLoad() As SQLValue
Get
Return New SQLValue(NotNull(_Enable_SQL_ONLOAD, ""))
Return New SQLValue(NotNull(_Enable_SQL_ONLOAD, ""), _sql_connection)
End Get
Set(ByVal value As SQLValue)
_Enable_SQL_ONLOAD = value.Value
SQLConnection = value.ConnectionId
End Set
End Property
@ -174,12 +192,24 @@ Public Module ModuleControlProperties
End Property
End Class
Public Class TextboxProperties
Public Class InputPropertiesWithControlData
Inherits InputProperties
<DisplayName("Set Control Data SQL")>
<Category(ClassConstants.CAT_BEHAVIOUR)>
Public Property SetControlData As SQLValue
Get
Return New SQLValue(_set_control_data, _sql_connection)
End Get
Set(value As SQLValue)
_set_control_data = value.Value
SQLConnection = value.ConnectionId
End Set
End Property
End Class
Public Class TextboxProperties
Inherits InputPropertiesWithControlData
<DisplayName("Regex Pattern")>
<Category(ClassConstants.CAT_VALIDATION)>
@ -200,26 +230,19 @@ Public Module ModuleControlProperties
End Class
Public Class CheckboxProperties
Inherits InputProperties
Inherits InputPropertiesWithControlData
<Category(ClassConstants.CAT_DISPLAY)>
Public Property Text() As String
<DisplayName("Set Control Data SQL")>
<Category(ClassConstants.CAT_BEHAVIOUR)>
Public Property SetControlData As SQLValue
End Class
Public Class ComboboxProperties
Inherits InputProperties
Inherits InputPropertiesWithControlData
<Category(ClassConstants.CAT_DISPLAY)>
Public Property Text() As String
<DisplayName("Set Control Data SQL")>
<Category(ClassConstants.CAT_BEHAVIOUR)>
Public Property SetControlData As SQLValue
<Browsable(False)>
Public Property ChoiceLists() As List(Of String)
@ -270,6 +293,7 @@ Public Module ModuleControlProperties
<Category(ClassConstants.CAT_BEHAVIOUR)>
Public Property AllowAddNewValues As Boolean
End Class
Public Class ButtonProperties
Inherits InputProperties
@ -290,8 +314,9 @@ Public Module ModuleControlProperties
End Set
End Property
End Class
Public Class LookupControlProperties
Inherits InputProperties
Inherits InputPropertiesWithControlData
<DisplayName("Multi Select")>
<Category(ClassConstants.CAT_BEHAVIOUR)>
@ -312,11 +337,6 @@ Public Module ModuleControlProperties
<DisplayName("Display As Combobox Control")>
<Category(ClassConstants.CAT_BEHAVIOUR)>
Public Property DisplayAsComboBox As Boolean
<DisplayName("Set Control Data SQL")>
<Category(ClassConstants.CAT_BEHAVIOUR)>
Public Property SetControlData As SQLValue
End Class
Public Class LineLabelProperties

View File

@ -1,37 +1,25 @@
Module ModuleMySettings
' Connection String
Public SOURCE_INIT As Boolean = False
Public CONNECTION_STRING_ECM As String = ""
Public CONNECTION_STRING_IDB As String = ""
Public IDB_ACTIVE As Boolean = False
Public EDMIAppServerActive As Boolean = False
Public Property SOURCE_INIT As Boolean = False
Public Property CONNECTION_STRING_ECM As String = ""
Public Property CONNECTION_STRING_IDB As String = ""
Public Property IDB_ACTIVE As Boolean = False
Public Property EDMIAppServerActive As Boolean = False
Public OPERATION_MODE_FS As String = "PURE_WM"
Public IDB_USES_WMFILESTORE As Boolean = False
Public BASIC_CONF_VISIBLE As Boolean = True
Public IDB_DOC_DATA_SQL As String
Public IDB_DT_DOC_DATA As DataTable
Public TEST_MODE As String = False
Public NO_DETAIL_PROFILES As Boolean = False
Public DT_CONNECTIONS As DataTable
Public Property OPERATION_MODE_FS As String = "PURE_WM"
Public Property IDB_USES_WMFILESTORE As Boolean = False
Public Property BASIC_CONF_VISIBLE As Boolean = True
Public Property IDB_DOC_DATA_SQL As String
Public Property IDB_DT_DOC_DATA As DataTable
Public Property NO_DETAIL_PROFILES As Boolean = False
' Debug Settings
Public DEBUG As Boolean = False
Public Property DEBUG As Boolean = False
' Viewer Settings
'Public VIEWER_UNIVERSAL As String = ""
'Public VIEWER_XCHANGE As String = ""
'Public VIEWER_SUMATRA As String = ""
'Public VIEWER_ZOOM_LEVEL As Integer = 3
'Public VIEWER_PDF As String = "internal"
'Public VIEWER_ALL As String = "docview"
Public INDEX_DMS_ERSTELLT = "DMS erstellt"
Public INDEX_DMS_ERSTELLT_ZEIT = "DMS erstellt (Zeit)"
Public USER_MANAGER_PATH = ""
Public Property INDEX_DMS_ERSTELLT = "DMS erstellt"
Public Property INDEX_DMS_ERSTELLT_ZEIT = "DMS erstellt (Zeit)"
' These settings are loaded from the database
Public VERSION_DELIMITER As String = "~"
Public FILE_DELIMITER As String = "_"
Public WMSESSION_STARTSTOP_STARTUP As Boolean = False
Public Property VERSION_DELIMITER As String = "~"
Public Property FILE_DELIMITER As String = "_"
Public Property WMSESSION_STARTSTOP_STARTUP As Boolean = False
End Module

View File

@ -7,7 +7,6 @@ Imports DigitalData.Modules.ZooFlow
Module ModuleRuntimeVariables
Public Property Database As DatabaseWithFallback
Public Property DatabaseECM As MSSQLServer
Public Property DatabaseIDB As MSSQLServer
Public Property EDMIService As New State.ServiceState
@ -29,7 +28,6 @@ Module ModuleRuntimeVariables
Public Property CURRENT_ProfilGUID As Integer
Public Property CURRENT_ProfilName As String
Public Property CURRENT_PROFILE_LOG_INDEX As String
Public Property CURRENT_HTML_DOC As String
Public Property CURRENT_DOC_GUID As Integer
Public Property CURRENT_DOC_ID As Integer
@ -38,8 +36,6 @@ Module ModuleRuntimeVariables
Public Property CURRENT_CONVERSATION_NEW As Long
Public Property CURRENT_CONN_ID As Integer
Public Property CURRENT_JUMP_DOC_GUID As Integer
Public Property CURRENT_WMFILE As WMObject
@ -47,7 +43,6 @@ Module ModuleRuntimeVariables
Public Property ERROR_STATE = ""
Public Property USER_USERNAME As String
Public Property DT_USER2MODULE As DataTable
Public Property CHANGES_FORM_DESIGN As Boolean = False
@ -107,9 +102,6 @@ Module ModuleRuntimeVariables
Public Property CURRENT_INDEX_ID As Integer
Public Property CURRENT_OBJECTTYPE As String
Public Property CURRENT_DESIGN_TYPE As String = "FINAL_INDEX"
Public Property CURRENT_SQL_CON As Integer
Public Property CURRENT_SQL_COMAMND As String
Public Property CURRENT_DT_SQL_CONFIG_TABLE As DataTable
Public Property CURRENT_CLICKED_PROFILE_ID As Integer = 0
Public Property CURRENT_CLICKED_PROFILE_TITLE As String
@ -130,12 +122,8 @@ Module ModuleRuntimeVariables
Public Property CURRENT_DT_PROFILES As DataTable
Public Property CURRENT_DT_PROFILE As DataTable
Public Property CURRENT_CONTROL_LIST As New List(Of Control)
Public Property CURRENT_CONTROL_NAME_LIST As New List(Of String)
Public CURRENT_INDEX_ARRAY(100, 250) As String
Public Property DTVWCONTROLS_INDEX As DataTable
Public Property DTVWCONTROL_INDEX As DataTable

View File

@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("TaskFlow")>
<Assembly: AssemblyCopyright("Copyright © Digital Data 2022")>
<Assembly: AssemblyTrademark("2.3.7.11")>
<Assembly: AssemblyTrademark("2.3.7.12")>
<Assembly: ComVisible(False)>
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.7.11")>
<Assembly: AssemblyVersion("2.3.7.12")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@ -247,7 +247,7 @@
<value>58</value>
</data>
<data name="gridAssignedUsers.Size" type="System.Drawing.Size, System.Drawing">
<value>740, 221</value>
<value>740, 220</value>
</data>
<data name="gridAssignedUsers.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
@ -415,7 +415,7 @@
<value>58</value>
</data>
<data name="gridAvailableUsers.Size" type="System.Drawing.Size, System.Drawing">
<value>740, 196</value>
<value>740, 197</value>
</data>
<data name="gridAvailableUsers.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
@ -502,7 +502,7 @@
<value>740, 471</value>
</data>
<data name="SplitContainer_Profilzuordnung2.SplitterDistance" type="System.Int32, mscorlib">
<value>246</value>
<value>245</value>
</data>
<data name="SplitContainer_Profilzuordnung2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -565,7 +565,7 @@
<value>58</value>
</data>
<data name="gridAssignedGroups.Size" type="System.Drawing.Size, System.Drawing">
<value>740, 192</value>
<value>740, 191</value>
</data>
<data name="gridAssignedGroups.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
@ -688,7 +688,7 @@
<value>58</value>
</data>
<data name="gridAvailableGroups.Size" type="System.Drawing.Size, System.Drawing">
<value>740, 225</value>
<value>740, 226</value>
</data>
<data name="gridAvailableGroups.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -778,7 +778,7 @@
<value>740, 471</value>
</data>
<data name="SplitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>217</value>
<value>216</value>
</data>
<data name="SplitContainer1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>

View File

@ -229,8 +229,13 @@ Public Class frmAdministration
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles btnWMSuche.Click
If IDB_ACTIVE = True Then
CURRENT_DESIGN_TYPE = "IDB_SEARCH"
Dim oForm As New frmSQLEditor(LOGCONFIG, DatabaseECM) With {.SQLCommand = Me.WD_SEARCHTextBox.Text, .SQLConnection = 1}
Dim oForm As New frmSQLEditor(LOGCONFIG, DatabaseECM) With {
.SQLCommand = Me.WD_SEARCHTextBox.Text,
.SQLConnection = 1,
.AllowSQLConnectionSelection = False
}
oForm.ShowDialog()
If oForm.DialogResult = DialogResult.OK Then
Me.WD_SEARCHTextBox.Text = oForm.SQLCommand
End If
@ -960,20 +965,20 @@ Public Class frmAdministration
Dim oSequence As Int16 = NotNull(focusedRow.Item("SEQUENCE"), 0)
Dim oIndetermined As Boolean = NotNull(focusedRow.Item("CONTINUE_INDETERMINED"), False)
CURRENT_INDEX_ID = guid
CURRENT_SQL_CON = connectionId
Dim obj As New FinalIndexProperties()
obj.GUID = guid
obj.IndexName = index
obj.SQLCommand = New SQLValue(sqlCommand)
obj.ConnectionId = connectionId
obj.Description = description
obj.Active = active
obj.AllowAddNewValues = allowNewValues
obj.PreventDuplicates = preventDuplicates
obj.VectorBehaviour = VectorBehaviour
obj.Sequence = oSequence
obj.ContinueOnIndifferentState = oIndetermined
Dim obj As New FinalIndexProperties With {
.GUID = guid,
.IndexName = index,
.SQLCommand = New SQLValue(sqlCommand, connectionId),
.ConnectionId = connectionId,
.Description = description,
.Active = active,
.AllowAddNewValues = allowNewValues,
.PreventDuplicates = preventDuplicates,
.VectorBehaviour = VectorBehaviour,
.Sequence = oSequence,
.ContinueOnIndifferentState = oIndetermined
}
' Wenn eine neue Zeile hinzugefügt wird, auf StringValue setzen
If e.FocusedRowHandle <> GridControl.NewItemRowHandle Then
obj = FINALINDICES.SetValue(value, obj, index, MyIndicies, MyIndicies_Types)
@ -992,7 +997,7 @@ Public Class frmAdministration
"Overwrite"
}
If Not index Is Nothing Then
If index IsNot Nothing Then
Dim indexType As Integer = FINALINDICES.GetIndexType(index, MyIndicies, MyIndicies_Types)
obj.VectorIndex = FINALINDICES.IsVectorIndex(indexType)
End If
@ -1018,8 +1023,10 @@ Public Class frmAdministration
Dim value As SQLValue = e.ChangedItem.Value
If value.Value <> String.Empty Then
obj.ConnectionId = CURRENT_SQL_CON
'obj.ConnectionId = CURRENT_CONN_ID_FINAL_INDEX
obj.StringValue = "SQL-Command"
obj.ConnectionId = value.ConnectionId
'obj.FloatValue = 0
' obj.IntegerValue = 0
End If
@ -1268,8 +1275,11 @@ Public Class frmAdministration
Dim guid = obj.GUID
Dim oProfileId As Integer = PROFILGUIDTextBox.Text
Dim connectionId As Integer = obj.ConnectionId
'Dim connectionId As Integer = obj.ConnectionId
Dim connectionId As Integer = NotNull(obj.SQLCommand.ConnectionId, 1)
Dim sqlCommand As String = NotNull(obj.SQLCommand.Value, String.Empty).Replace("'", "''")
Dim indexName As String = NotNull(obj.IndexName, String.Empty)
Dim isVectorIndex As Boolean = obj.VectorIndex
Dim addedWho As String = USER_USERNAME

View File

@ -6,6 +6,7 @@ Imports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.XtraGrid.Views.Grid.ViewInfo
Imports DigitalData.Controls.LookupGrid
Imports DigitalData.Modules.Language.Utils
Imports DigitalData.Modules.Language
Imports System.Drawing
Imports DigitalData.GUIs.Common
@ -292,8 +293,6 @@ Public Class frmFormDesigner
SetMovementHandlers(oButton)
End Select
Next
CURRENT_CONTROL_LIST = pnldesigner.Controls.Cast(Of Control).ToList()
Catch ex As Exception
LOGGER.Error(ex)
MsgBox("Fehler bei LoadControls " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
@ -786,7 +785,11 @@ Public Class frmFormDesigner
obj.Active = StrToBool(row.Item("CONTROL_ACTIVE"))
obj.Index = NotNull(row.Item("INDEX_NAME"), "")
obj.DefaultValue = NotNull(row.Item("DEFAULT_VALUE"), Nothing)
obj.SQLCommand = New SQLValue(row.Item("SQL_UEBERPRUEFUNG"))
' Default value for ConnectionID
Dim oConnectionId = row.ItemEx("CONNECTION_ID", 0)
obj.SQLCommand = New SQLValue(row.Item("SQL_UEBERPRUEFUNG"), oConnectionId)
obj.SQLConnection = oConnectionId
Return obj
End Function
@ -936,7 +939,10 @@ Public Class frmFormDesigner
Private Sub pgControls_PropertyValueChanged(s As Object, e As PropertyValueChangedEventArgs) Handles pgControls.PropertyValueChanged
Dim oldValue As Object = e.OldValue
Dim newValue = e.ChangedItem.Value
Dim prop As String = e.ChangedItem.Label
'Dim prop As String = e.ChangedItem.Label
Dim prop As String = e.ChangedItem.PropertyDescriptor.Name
Select Case prop
Case "DisplayAsLookUpControl"
@ -1016,29 +1022,27 @@ Public Class frmFormDesigner
CurrentControl.ForeColor = color
Case "SQLCommand"
UpdateSingleValue("SQL_UEBERPRUEFUNG", newValue)
UpdateSingleValue("CONNECTION_ID", CURRENT_CONN_ID)
UpdateSingleValue("CHOICE_LIST", "")
Case "Enable_SQL"
UpdateSingleValue("SQL_ENABLE", newValue)
UpdateSingleValue("CONNECTION_ID", CURRENT_CONN_ID)
UpdateSingleValue("CHOICE_LIST", "")
Case "Enable_SQL_OnLoad"
UpdateSingleValue("SQL_ENABLE_ON_LOAD", newValue)
UpdateSingleValue("SQL_ENABLE_ON_LOAD_CONID", CURRENT_CONN_ID)
UpdateSingleValue("CHOICE_LIST", "")
Case "Override_SQL"
UpdateSingleValue("SQL2", newValue)
UpdateSingleValue("CONNECTION_ID", CURRENT_CONN_ID)
UpdateSingleValue("CHOICE_LIST", "")
Case "SetControlData"
UpdateSingleValue("SET_CONTROL_DATA", newValue)
UpdateSingleValue("CONNECTION_ID", CURRENT_CONN_ID)
UpdateSingleValue("CHOICE_LIST", "")
Case "ChoiceList"
UpdateSingleValue("CHOICE_LIST", newValue)
UpdateSingleValue("SQL_UEBERPRUEFUNG", "")
UpdateSingleValue("CONNECTION_ID", "NULL")
Case "MultiSelect"
UpdateSingleValue("MULTISELECT", IIf(newValue = True, 1, 0))
@ -1103,6 +1107,8 @@ Public Class frmFormDesigner
ElseIf TypeOf value Is SQLValue Then
Dim v As SQLValue = value
escapedValue = $"'{v.Value.Replace("'", "''")}'"
UpdateSingleValue("CONNECTION_ID", v.ConnectionId)
End If
Try

View File

@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw
CAAAAk1TRnQBSQFMAgEBAgEAARQBCQEUAQkBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAASQBCQEkAQkBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -1755,9 +1755,21 @@ Public Class frmMain
Dim oindex As Integer = 0
If Not IsNothing(BASEDATA_DTGRID_GROUPS) Then
For Each oGridGroup As DataRow In BASEDATA_DTGRID_GROUPS.Rows
LOGGER.Debug($"Adding group [{oGridGroup.Item("GROUPNAME")}] for Grid...")
Dim oGroupName = oGridGroup.Item("GROUPNAME")
LOGGER.Debug($"Adding group [{oGroupName}] for Grid...")
Try
GridViewWFItems.Columns.Item(oGridGroup.Item("GROUPNAME")).GroupIndex = oindex
Dim oGroupColumn As GridColumn = GridViewWFItems.Columns.Item(oGroupName)
If oGroupColumn IsNot Nothing Then
oGroupColumn.GroupIndex = oindex
oGroupColumn.Group()
oGroupColumn.OptionsColumn.AllowGroup = DefaultBoolean.False
oGroupColumn.OptionsColumn.AllowMove = DefaultBoolean.False
oGroupColumn.OptionsColumn.AllowShowHide = DefaultBoolean.False
oGroupColumn.Visible = False
End If
Catch ex As Exception
End Try

View File

@ -700,7 +700,6 @@ Public Class frmMassValidator
Dim oArrlist As New List(Of String)
oArrlist.Add(oWindreamValue.ToString)
oLookup.Properties.SelectedValues = oArrlist
'_CURRENT_INDEX_ARRAY(oCount, 1) = oWindreamValue.ToString
End If
Else
If Not IsNothing(oLookup.Properties.SelectedValues) Then

View File

@ -73,7 +73,6 @@ Public Class frmValidator
Private Property _Indexe_Loaded As Boolean = False
Public Shared Property idxerr_message As String = ""
Private _CURRENT_INDEX_ARRAY(100, 250) As String
Private Property _frmValidatorSearch As frmValidatorSearch 'You need a reference to Form1
Private Property _dependingControl_in_action As Boolean = False
@ -2495,7 +2494,6 @@ Public Class frmValidator
WMDocPathWindows = ""
WMDocFileString = ""
CURRENT_HTML_DOC = ""
'Me.lblerror.Visible = False
_Indexe_Loaded = False
@ -3028,7 +3026,6 @@ Public Class frmValidator
LOGGER.Debug("INDEX: " & oSourceIndexName & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & oLoadIndex.ToString)
_CURRENT_INDEX_ARRAY(oCount, 0) = oSourceIndexName
Select Case oType
Case "System.Windows.Forms.TextBox"
Try
@ -3041,7 +3038,6 @@ Public Class frmValidator
If oLoadIndex = False Or oSourceIndexName = "DD PM-ONLY FOR DISPLAY" Then
' Wenn kein Index exisitiert, defaultValue laden
oControl.Text = oDefaultValue
_CURRENT_INDEX_ARRAY(oCount, 1) = oDefaultValue
LOGGER.Debug("Indexwert soll nicht geladen werden.")
Exit Select
End If
@ -3082,11 +3078,9 @@ Public Class frmValidator
ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER)
_CURRENT_INDEX_ARRAY(oCount, 1) = NotNull(oValueFromSource, oDefaultValue)
Catch ex As Exception
LOGGER.Info("ERROR while converting defaultValue [" & oDefaultValue & "]: " & ex.Message)
oControl.Text = ""
_CURRENT_INDEX_ARRAY(oCount, 1) = ""
End Try
@ -3116,7 +3110,6 @@ Public Class frmValidator
oMyCombobox.SelectedIndex = -1
Else
oMyCombobox.Text = oDefaultValue
_CURRENT_INDEX_ARRAY(oCount, 1) = oDefaultValue
End If
LOGGER.Debug($" oMyComboBox {oMyCombobox.Name}: Indexwert soll nicht geladen werden.")
Exit Select
@ -3137,7 +3130,6 @@ Public Class frmValidator
Else
LOGGER.Debug($"oMyComboBox {oMyCombobox.Name}-defaultValue wird geladen")
oMyCombobox.Text = oDefaultValue
_CURRENT_INDEX_ARRAY(oCount, 1) = oDefaultValue
'cmb.SelectedIndex = cmb.FindStringExact(defaultValue)
End If
Else
@ -3161,8 +3153,6 @@ Public Class frmValidator
LOGGER.Debug($"Indexwert from Index {oSourceIndexName}: {oValueFromSource}")
LOGGER.Debug($"Items in Combobox: {oMyCombobox.Items.Count}")
_CURRENT_INDEX_ARRAY(oCount, 1) = oValueFromSource
LOGGER.Debug($"_CURRENT_INDEX_ARRAY set...")
If oMyCombobox.Items.Count = 0 Then
' If LogErrorsOnly = False Then LOGGER.Info($"Index Wert wurde gesetzt")
oMyCombobox.Text = oValueFromSource
@ -3396,7 +3386,6 @@ Public Class frmValidator
LOGGER.Info(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & oIndexName & "' ist nothing. Checking defaultvalue")
LOGGER.Debug(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & oIndexName & "' ist nothing. Checking defaultvalue")
If oDefaultValue <> String.Empty Then
_CURRENT_INDEX_ARRAY(oCount, 1) = oDefaultValue
LOGGER.Info($"Using Default value [{oDefaultValue}]")
LOGGER.Debug($"Using Default value [{oDefaultValue}]")
myCheckBox.Checked = CBool(oDefaultValue)
@ -3409,7 +3398,6 @@ Public Class frmValidator
Else
LOGGER.Debug("oValueFromSource: " & oValueFromSource.ToString)
_CURRENT_INDEX_ARRAY(oCount, 1) = oValueFromSource.ToString
If oValueFromSource.ToString = "" Then
LOGGER.Info(">> Versuch, default Value zu laden")
If oDefaultValue <> String.Empty Then
@ -3496,12 +3484,10 @@ Public Class frmValidator
End If
oLookup.Properties.SelectedValues = oArrlist
_CURRENT_INDEX_ARRAY(oCount, 1) = oValueFromSource.ToString
Else
Dim oArrlist As New List(Of String)
oArrlist.Add(oValueFromSource.ToString)
oLookup.Properties.SelectedValues = oArrlist
_CURRENT_INDEX_ARRAY(oCount, 1) = oValueFromSource.ToString
End If
Else
If Not IsNothing(oLookup.Properties.SelectedValues) Then
@ -3555,9 +3541,6 @@ Public Class frmValidator
ValueDTP = tempdate
DTP.Text = tempdate
End If
_CURRENT_INDEX_ARRAY(oCount, 1) = oValueFromSource.ToString
Catch ex As Exception
LOGGER.Error(ex)
errormessage = "Unvorhergesehener Fehler bei DTP: " & vbNewLine & ex.Message
@ -3566,13 +3549,7 @@ Public Class frmValidator
frmError.ShowDialog()
LOGGER.Info("Unexpected error in FillIndex DTP: " & ex.Message, True)
End Try
End If
'Case Else
' MsgBox(Type)
End Select
oCount += 1
Next