This commit is contained in:
2019-10-17 16:27:29 +02:00
11 changed files with 373 additions and 304 deletions

View File

@@ -47,7 +47,7 @@ Public Class ClassControlCreator
Public Class ControlMetadata Public Class ControlMetadata
Public Guid As Integer Public Guid As Integer
Public [ReadOnly] As Boolean Public [ReadOnly] As Boolean = False
End Class End Class
Private Shared Function TransformDataRow(row As DataRow) As ControlDBProps Private Shared Function TransformDataRow(row As DataRow) As ControlDBProps
@@ -82,7 +82,6 @@ Public Class ClassControlCreator
.Guid = props.Guid, .Guid = props.Guid,
.ReadOnly = props.ReadOnly .ReadOnly = props.ReadOnly
} }
'ctrl.Tag = props.Guid
ctrl.Name = props.Name ctrl.Name = props.Name
ctrl.Location = props.Location ctrl.Location = props.Location
ctrl.Font = props.Font ctrl.Font = props.Font
@@ -93,7 +92,7 @@ Public Class ClassControlCreator
End If End If
If props.ReadOnly Then If props.ReadOnly Then
ctrl.BackColor = Color.Gray ctrl.BackColor = Color.LightGray
End If End If
Return ctrl Return ctrl
@@ -243,6 +242,7 @@ Public Class ClassControlCreator
control.AcceptsReturn = True control.AcceptsReturn = True
control.ReadOnly = row.Item("READ_ONLY") control.ReadOnly = row.Item("READ_ONLY")
control.TabStop = Not row.Item("READ_ONLY") control.TabStop = Not row.Item("READ_ONLY")
control.BackColor = IIf(row.Item("READ_ONLY"), Color.LightGray, Color.White)
Else Else
control.ReadOnly = True control.ReadOnly = True
End If End If
@@ -267,10 +267,10 @@ Public Class ClassControlCreator
If Not designMode Then If Not designMode Then
control.Enabled = Not row.Item("READ_ONLY") control.Enabled = Not row.Item("READ_ONLY")
control.TabStop = Not row.Item("READ_ONLY") control.TabStop = Not row.Item("READ_ONLY")
control.BackColor = IIf(row.Item("READ_ONLY"), Color.LightGray, Color.White)
control.AutoCompleteMode = AutoCompleteMode.SuggestAppend control.AutoCompleteMode = AutoCompleteMode.SuggestAppend
control.AutoCompleteSource = AutoCompleteSource.ListItems control.AutoCompleteSource = AutoCompleteSource.ListItems
End If End If
Return control Return control
@@ -332,6 +332,7 @@ Public Class ClassControlCreator
Public Shared Function CreateExistingLookupControl(row As DataRow, designMode As Boolean) As LookupControl2 Public Shared Function CreateExistingLookupControl(row As DataRow, designMode As Boolean) As LookupControl2
Dim control As LookupControl2 = CreateBaseControl(New LookupControl2(), row, designMode) Dim control As LookupControl2 = CreateBaseControl(New LookupControl2(), row, designMode)
control.Width = row.Item("WIDTH") control.Width = row.Item("WIDTH")
control.ReadOnly = row.Item("READ_ONLY")
If designMode Then If designMode Then
control.Cursor = Cursors.Hand control.Cursor = Cursors.Hand

View File

@@ -46,12 +46,6 @@
End If End If
Return value Return value
'If isVector Then
' Return $"{PREFIX_VECTOR}{value}"
'Else
' Return value
'End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex) LOGGER.Error(ex)
MsgBox($"Error in GetValue: {ex.Message}", MsgBoxStyle.Critical) MsgBox($"Error in GetValue: {ex.Message}", MsgBoxStyle.Critical)

View File

@@ -0,0 +1,23 @@
Imports System.ComponentModel
Imports System.Globalization
Public Class ClassVectorBehaviourListConverter
Inherits TypeConverter
Public Overrides Function GetStandardValuesSupported(context As ITypeDescriptorContext) As Boolean
Return True
End Function
Public Overrides Function GetStandardValues(context As ITypeDescriptorContext) As StandardValuesCollection
Dim oBehaviourList = DirectCast(context.Instance, FinalIndexProperties).VectorBehaviourType
Return New StandardValuesCollection(oBehaviourList)
End Function
Public Overrides Function ConvertTo(context As ITypeDescriptorContext, culture As CultureInfo, value As Object, destinationType As Type) As Object
If IsNothing(value) Then
Return ""
Else
Return value.ToString()
End If
End Function
End Class

View File

@@ -220,6 +220,7 @@
<Compile Include="ClassSQLTypeConverter.vb" /> <Compile Include="ClassSQLTypeConverter.vb" />
<Compile Include="ClassSQLValue.vb" /> <Compile Include="ClassSQLValue.vb" />
<Compile Include="ClassUser.vb" /> <Compile Include="ClassUser.vb" />
<Compile Include="ClassVectorBehaviourListConverter.vb" />
<Compile Include="ClassWorkDoc.vb" /> <Compile Include="ClassWorkDoc.vb" />
<Compile Include="clsPatterns.vb" /> <Compile Include="clsPatterns.vb" />
<Compile Include="clsWMDocGrid.vb" /> <Compile Include="clsWMDocGrid.vb" />

View File

@@ -65,7 +65,8 @@ Module ModuleFinalIndexProperties
<Category("Index")> <Category("Index")>
<DisplayName("IndexBehaviour")> <DisplayName("IndexBehaviour")>
<PropertyAttributesProvider("IndexTypeStringProvider")> <TypeConverter(GetType(ClassVectorBehaviourListConverter))>
<PropertyAttributesProvider("VectorIndexOnlyProvider")>
Public Property VectorBehaviour As String Public Property VectorBehaviour As String
<Category("Index")> <Category("Index")>
@@ -77,6 +78,8 @@ Module ModuleFinalIndexProperties
Public Property Indicies As List(Of String) Public Property Indicies As List(Of String)
<Browsable(False)> <Browsable(False)>
Public Property IndiciesType As List(Of Integer) Public Property IndiciesType As List(Of Integer)
<Browsable(False)>
Public Property VectorBehaviourType As List(Of String)
Public Sub VectorIndexBooleanProvider(attrs As PropertyAttributes) Public Sub VectorIndexBooleanProvider(attrs As PropertyAttributes)
MaybeSetReadOnlyIfNotVectorIndex(attrs) MaybeSetReadOnlyIfNotVectorIndex(attrs)
@@ -107,6 +110,10 @@ Module ModuleFinalIndexProperties
MaybeSetReadOnlyIfSQLHasNoValue(attrs) MaybeSetReadOnlyIfSQLHasNoValue(attrs)
End Sub End Sub
Public Sub VectorIndexOnlyProvider(attrs As PropertyAttributes)
MaybeSetBrowsable(attrs, {ClassFinalIndex.INDEX_TYPE_VECTOR_STRING})
End Sub
Public Sub MaybeSetReadOnlyIfSQLHasNoValue(attrs As PropertyAttributes) Public Sub MaybeSetReadOnlyIfSQLHasNoValue(attrs As PropertyAttributes)
Dim hasSQLValue As Boolean = (SQLCommand.Value <> String.Empty) Dim hasSQLValue As Boolean = (SQLCommand.Value <> String.Empty)

View File

@@ -2812,7 +2812,7 @@ der Wertänderungen nutzen wollen:</value>
<value>Neu hinzufügen</value> <value>Neu hinzufügen</value>
</data> </data>
<data name="BindingNavigatorCountItem1.Size" type="System.Drawing.Size, System.Drawing"> <data name="BindingNavigatorCountItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>127, 24</value> <value>128, 24</value>
</data> </data>
<data name="BindingNavigatorCountItem1.Text" xml:space="preserve"> <data name="BindingNavigatorCountItem1.Text" xml:space="preserve">
<value>von {0} finalen Indexen</value> <value>von {0} finalen Indexen</value>
@@ -2978,7 +2978,7 @@ der Wertänderungen nutzen wollen:</value>
<value>9, 133</value> <value>9, 133</value>
</data> </data>
<data name="BindingNavigator1.Size" type="System.Drawing.Size, System.Drawing"> <data name="BindingNavigator1.Size" type="System.Drawing.Size, System.Drawing">
<value>798, 27</value> <value>679, 27</value>
</data> </data>
<data name="BindingNavigator1.TabIndex" type="System.Int32, mscorlib"> <data name="BindingNavigator1.TabIndex" type="System.Int32, mscorlib">
<value>92</value> <value>92</value>

View File

@@ -952,7 +952,7 @@ Public Class frmAdministration
Dim description As String = NotNull(focusedRow.Item("DESCRIPTION"), "") Dim description As String = NotNull(focusedRow.Item("DESCRIPTION"), "")
Dim preventDuplicates As Boolean = NotNull(focusedRow.Item("PREVENT_DUPLICATES"), False) Dim preventDuplicates As Boolean = NotNull(focusedRow.Item("PREVENT_DUPLICATES"), False)
Dim allowNewValues As Boolean = NotNull(focusedRow.Item("ALLOW_NEW_VALUES"), False) Dim allowNewValues As Boolean = NotNull(focusedRow.Item("ALLOW_NEW_VALUES"), False)
Dim VectorBehaviour As String = NotNull(focusedRow.Item("IF_VEKTOR_BEHAVIOUR"), False) Dim VectorBehaviour As String = NotNull(focusedRow.Item("IF_VEKTOR_BEHAVIOUR"), "Add")
CURRENT_INDEX_ID = guid CURRENT_INDEX_ID = guid
@@ -1003,6 +1003,10 @@ Public Class frmAdministration
obj.Indicies = Windream_Indicies obj.Indicies = Windream_Indicies
obj.IndiciesType = Windream_Indicies_Types obj.IndiciesType = Windream_Indicies_Types
obj.IndexName = index obj.IndexName = index
obj.VectorBehaviourType = New List(Of String) From {
"Add",
"Overwrite"
}
If Not index Is Nothing Then If Not index Is Nothing Then
Dim indexType As Integer = ClassFinalIndex.GetIndexType(index, Windream_Indicies, Windream_Indicies_Types) Dim indexType As Integer = ClassFinalIndex.GetIndexType(index, Windream_Indicies, Windream_Indicies_Types)
@@ -1168,13 +1172,4 @@ Public Class frmAdministration
LOGGER.Error(ex) LOGGER.Error(ex)
End Try End Try
End Sub End Sub
'Private Sub viewFinalIndex_ValidateRow(sender As Object, e As Views.Base.ValidateRowEventArgs) Handles viewFinalIndex.ValidateRow
' Dim rowView As DataRowView = e.Row
' If rowView.IsNew Then
' Dim props As FinalIndexProperties = PropertyGrid1.SelectedObject
' End If
'End Sub
End Class End Class

View File

@@ -437,26 +437,32 @@ Public Class frmFormDesigner
End Function End Function
Sub SetActiveControlColor() Sub SetActiveControlColor()
CurrentControl.BackColor = Color.DarkOrange If DirectCast(CurrentControl.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
CurrentControl.BackColor = Color.DarkOrange
End If
' Reset Color of all other controls ' Reset Color of all other controls
For Each inctrl As Control In Me.pnldesigner.Controls For Each oControl As Control In Me.pnldesigner.Controls
If inctrl.Name <> CurrentControl.Name Then If oControl.Name <> CurrentControl.Name Then
Dim Type As String = inctrl.GetType.ToString Dim oMetadata = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata)
Select Case Type
Case "System.Windows.Forms.TextBox" If oMetadata.ReadOnly = False Then
inctrl.BackColor = Color.White Dim Type As String = oControl.GetType.ToString
Case "System.Windows.Forms.ComboBox" Select Case Type
inctrl.BackColor = Color.White Case "System.Windows.Forms.TextBox"
Case "System.Windows.Forms.Label" oControl.BackColor = Color.White
inctrl.BackColor = Color.Transparent Case "System.Windows.Forms.ComboBox"
Case "System.Windows.Forms.CheckBox" oControl.BackColor = Color.White
inctrl.BackColor = Color.Transparent Case "System.Windows.Forms.Label"
Case "DD_PM_WINDREAM.ClassControlCreator+LineLabel" oControl.BackColor = Color.Transparent
inctrl.BackColor = inctrl.ForeColor Case "System.Windows.Forms.CheckBox"
Case "DigitalData.Controls.LookupGrid.LookupControl2" oControl.BackColor = Color.Transparent
inctrl.BackColor = Color.White Case "DD_PM_WINDREAM.ClassControlCreator+LineLabel"
End Select oControl.BackColor = oControl.ForeColor
Case "DigitalData.Controls.LookupGrid.LookupControl2"
oControl.BackColor = Color.White
End Select
End If
End If End If
Next Next
End Sub End Sub
@@ -622,6 +628,12 @@ Public Class frmFormDesigner
Dim CurrentPosition = CurrentControl.Location Dim CurrentPosition = CurrentControl.Location
Dim OldPosition As Point = DirectCast(pgControls.SelectedObject, BaseProperties).Location Dim OldPosition As Point = DirectCast(pgControls.SelectedObject, BaseProperties).Location
If CurrentPosition.X = OldPosition.X + 2 And CurrentPosition.Y = OldPosition.Y + 2 Then
CurrentControl.Location = New Point(CurrentPosition.X - 2, CurrentPosition.Y - 2)
MyBase.Cursor = Cursors.Default
Exit Sub
End If
If Not Point.op_Inequality(CurrentPosition, OldPosition) Then If Not Point.op_Inequality(CurrentPosition, OldPosition) Then
MyBase.Cursor = Cursors.Default MyBase.Cursor = Cursors.Default
Exit Sub Exit Sub

View File

@@ -1528,17 +1528,16 @@ Public Class frmMain
'If e.Button = MouseButtons.Left Then 'If e.Button = MouseButtons.Left Then
' wenn in eine Group Row Doppelt geklickt wurde.. ' wenn in eine Group Row Doppelt geklickt wurde..
If hi.InGroupRow And Not groupRowButtonClicked Then If hi.InGroupRow And Not groupRowButtonClicked Then
' Ein/Ausklappen verhindern ' Ein/Ausklappen verhindern
DXMouseEventArgs.GetMouseArgs(e).Handled = True DXMouseEventArgs.GetMouseArgs(e).Handled = True
GridViewItem_Clicked = "GROUP" GridViewItem_Clicked = "GROUP"
CURRENT_CLICKED_PROFILE_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(hi.RowHandle), GridView_Docs.Columns("PROFILE_ID")) CURRENT_CLICKED_PROFILE_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(hi.RowHandle), GridView_Docs.Columns("PROFILE_ID"))
ElseIf hi.InDataRow Then ElseIf hi.InDataRow Then
GridViewItem_Clicked = "ROW" GridViewItem_Clicked = "ROW"
Dim profileid = CURRENT_CLICKED_PROFILE_ID CURRENT_CLICKED_PROFILE_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(hi.RowHandle), GridView_Docs.Columns("PROFILE_ID"))
Else Else
GridViewItem_Clicked = Nothing GridViewItem_Clicked = Nothing
End If End If
'End If
End Sub End Sub
Private Sub GridView_Docs_ColumnWidthChanged(sender As Object, e As Views.Base.ColumnEventArgs) Handles GridView_Docs.ColumnWidthChanged Private Sub GridView_Docs_ColumnWidthChanged(sender As Object, e As Views.Base.ColumnEventArgs) Handles GridView_Docs.ColumnWidthChanged

View File

@@ -135,7 +135,7 @@ Public Class frmMassValidator
Dim oCount = 0 Dim oCount = 0
For Each oControlRow As DataRow In DTCONTROLS.Rows For Each oControlRow As DataRow In DTCONTROLS.Rows
Dim ctrl As Control Dim oControl As Control
Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper
Case "TXT" Case "TXT"
@@ -146,161 +146,170 @@ Public Class frmMassValidator
AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus
AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp
ctrl = txt oControl = txt
Case "LBL" Case "LBL"
LOGGER.Debug("Versuch LBL zu laden") LOGGER.Debug("Versuch LBL zu laden")
ctrl = ClassControlCreator.CreateExistingLabel(oControlRow, False) oControl = ClassControlCreator.CreateExistingLabel(oControlRow, False)
Case "CMB" Case "CMB"
LOGGER.Debug("Versuch CMB zu laden") LOGGER.Debug("Versuch CMB zu laden")
Dim cmb = ClassControlCreator.CreateExistingCombobox(oControlRow, False) If oControlRow.Item("READ_ONLY") Then
Dim cmbReadonly = ClassControlCreator.CreateExistingTextbox(oControlRow, False)
oControl = cmbReadonly
Else
Dim cmb = ClassControlCreator.CreateExistingCombobox(oControlRow, False)
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
#Region "CONTROL LIST" #Region "CONTROL LIST"
If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, cmb.Name) = 0 Then If ClassControlCreator.GET_CONTROL_PROPERTIES(DTCONTROLS, cmb.Name) = 0 Then
MsgBox("Unexpected Error in getting control-properties (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) MsgBox("Unexpected Error in getting control-properties (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
Exit Sub Exit Sub
End If End If
Dim CURR_SQL_PROVIDER As String Dim CURR_SQL_PROVIDER As String
If CURRENT_CONTROL_ID > 0 Then If CURRENT_CONTROL_ID > 0 Then
If CURR_CON_ID > 0 Then If CURR_CON_ID > 0 Then
Dim commandsql = CURR_SELECT_CONTROL Dim commandsql = CURR_SELECT_CONTROL
If commandsql <> "" Then If commandsql <> "" Then
LOGGER.Debug("ConID > 0 And commandsql <> ''") LOGGER.Debug("ConID > 0 And commandsql <> ''")
Dim connectionString As String Dim connectionString As String
Dim ConRow As DataRow() = ClassControlCreator.GET_CONNECTION_INFO(CURR_CON_ID) Dim ConRow As DataRow() = ClassControlCreator.GET_CONNECTION_INFO(CURR_CON_ID)
If ConRow Is Nothing Then If ConRow Is Nothing Then
MsgBox("Unexpected Error in getting Coninfo (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical) MsgBox("Unexpected Error in getting Coninfo (CMB load) - Check the log and inform Your sysadmin!", MsgBoxStyle.Critical)
Exit Sub Exit Sub
End If End If
For Each row As DataRow In ConRow For Each row As DataRow In ConRow
Select Case row("SQL_PROVIDER").ToString.ToLower Select Case row("SQL_PROVIDER").ToString.ToLower
Case "ms-sql" Case "ms-sql"
CURR_SQL_PROVIDER = "ms-sql" CURR_SQL_PROVIDER = "ms-sql"
If row("USERNAME") = "WINAUTH" Then If row("USERNAME") = "WINAUTH" Then
connectionString = "Data Source=" & row("SERVER") & ";Initial Catalog=" & row("DATENBANK") & ";Trusted_Connection=True;" connectionString = "Data Source=" & row("SERVER") & ";Initial Catalog=" & row("DATENBANK") & ";Trusted_Connection=True;"
Else Else
connectionString = "Data Source=" & row("SERVER") & ";Initial Catalog= " & row("DATENBANK") & ";User Id=" & row("USERNAME") & ";Password=" & row("PASSWORD") & ";" connectionString = "Data Source=" & row("SERVER") & ";Initial Catalog= " & row("DATENBANK") & ";User Id=" & row("USERNAME") & ";Password=" & row("PASSWORD") & ";"
End If
LOGGER.Debug("ConnString Sql-Server: " & connectionString)
Case "oracle"
CURR_SQL_PROVIDER = "oracle"
Dim conn As New OracleConnectionStringBuilder
Dim connstr As String
If row("SERVER") <> "" And row("DATENBANK").GetType.ToString <> "system.dbnull" Then
connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & row("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" &
row("DATENBANK") & ")));User Id=" & row("USERNAME") & ";Password=" & row("PASSWORD") & ";"
Else
conn.DataSource = row("SERVER")
conn.UserID = row("USERNAME")
conn.Password = row("PASSWORD")
conn.PersistSecurityInfo = True
conn.ConnectionTimeout = 120
connstr = conn.ConnectionString
End If
connectionString = connstr
Case Else
LOGGER.Info("ConnectionString-Type not integrated")
MsgBox("ConnectionString-Type not integrated", MsgBoxStyle.Critical)
Exit Sub
End Select
Next
If connectionString Is Nothing = False And CURR_SQL_PROVIDER = "ms-sql" Then
Try
Dim sqlCnn As SqlClient.SqlConnection
Dim sqlCmd As SqlClient.SqlCommand
Dim adapter As New SqlClient.SqlDataAdapter
Dim NewDataset As New DataSet
Dim i As Integer
'sql = ClassPatterns.ReplaceAllValues(sql, pnldesigner, aktivesDokument)
If clsPatterns.HasOnlySimplePatterns(CURR_SELECT_CONTROL) Then
CURR_SELECT_CONTROL = clsPatterns.ReplaceInternalValues(CURR_SELECT_CONTROL)
CURR_SELECT_CONTROL = clsPatterns.ReplaceControlValues(CURR_SELECT_CONTROL, pnldesigner)
sqlCnn = New SqlClient.SqlConnection(connectionString)
' Try
sqlCnn.Open()
sqlCmd = New SqlClient.SqlCommand(CURR_SELECT_CONTROL, sqlCnn)
adapter.SelectCommand = sqlCmd
adapter.Fill(NewDataset)
For i = 0 To NewDataset.Tables(0).Rows.Count - 1
cmb.Items.Add(NewDataset.Tables(0).Rows(i).Item(0))
Next
adapter.Dispose()
sqlCmd.Dispose()
sqlCnn.Close()
End If End If
LOGGER.Debug("ConnString Sql-Server: " & connectionString) Catch ex As Exception
Case "oracle" LOGGER.Error(ex)
CURR_SQL_PROVIDER = "oracle" LOGGER.Info("Unexpected Error in running depending sql-command: " & ex.Message)
Dim conn As New OracleConnectionStringBuilder Clipboard.SetText("Error: " & ex.Message & vbNewLine & "SQL: " & CURR_SELECT_CONTROL)
Dim connstr As String MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected Error in running depending sql-command:")
If row("SERVER") <> "" And row("DATENBANK").GetType.ToString <> "system.dbnull" Then End Try
connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & row("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" & End If
row("DATENBANK") & ")));User Id=" & row("USERNAME") & ";Password=" & row("PASSWORD") & ";" Else
Else LOGGER.Debug("Else Row 571")
conn.DataSource = row("SERVER")
conn.UserID = row("USERNAME")
conn.Password = row("PASSWORD")
conn.PersistSecurityInfo = True
conn.ConnectionTimeout = 120
connstr = conn.ConnectionString
End If
connectionString = connstr
Case Else
LOGGER.Info("ConnectionString-Type not integrated")
MsgBox("ConnectionString-Type not integrated", MsgBoxStyle.Critical)
Exit Sub
End Select
Next
If connectionString Is Nothing = False And CURR_SQL_PROVIDER = "ms-sql" Then
Try
Dim sqlCnn As SqlClient.SqlConnection
Dim sqlCmd As SqlClient.SqlCommand
Dim adapter As New SqlClient.SqlDataAdapter
Dim NewDataset As New DataSet
Dim i As Integer
'sql = ClassPatterns.ReplaceAllValues(sql, pnldesigner, aktivesDokument)
If clsPatterns.HasOnlySimplePatterns(CURR_SELECT_CONTROL) Then
CURR_SELECT_CONTROL = clsPatterns.ReplaceInternalValues(CURR_SELECT_CONTROL)
CURR_SELECT_CONTROL = clsPatterns.ReplaceControlValues(CURR_SELECT_CONTROL, pnldesigner)
sqlCnn = New SqlClient.SqlConnection(connectionString)
' Try
sqlCnn.Open()
sqlCmd = New SqlClient.SqlCommand(CURR_SELECT_CONTROL, sqlCnn)
adapter.SelectCommand = sqlCmd
adapter.Fill(NewDataset)
For i = 0 To NewDataset.Tables(0).Rows.Count - 1
cmb.Items.Add(NewDataset.Tables(0).Rows(i).Item(0))
Next
adapter.Dispose()
sqlCmd.Dispose()
sqlCnn.Close()
End If
Catch ex As Exception
LOGGER.Error(ex)
LOGGER.Info("Unexpected Error in running depending sql-command: " & ex.Message)
Clipboard.SetText("Error: " & ex.Message & vbNewLine & "SQL: " & CURR_SELECT_CONTROL)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected Error in running depending sql-command:")
End Try
End If End If
Else Else
LOGGER.Debug("Else Row 571") If CURR_CHOICE_LIST <> "" Then
End If LOGGER.Debug("In add_ComboBox - AListe: " & CURR_CHOICE_LIST)
Else Dim liste = WINDREAM.GetValuesfromAuswahlliste(CURR_CHOICE_LIST)
If CURR_CHOICE_LIST <> "" Then If liste IsNot Nothing Then
LOGGER.Debug("In add_ComboBox - AListe: " & CURR_CHOICE_LIST) cmb.Items.Add("")
Dim liste = WINDREAM.GetValuesfromAuswahlliste(CURR_CHOICE_LIST) For Each index As String In liste
If liste IsNot Nothing Then cmb.Items.Add(index)
cmb.Items.Add("") Next
For Each index As String In liste cmb.SelectedIndex = -1
cmb.Items.Add(index) Else
Next MsgBox("Resultliste windream is nothing!", MsgBoxStyle.Exclamation, CURR_CHOICE_LIST)
cmb.SelectedIndex = -1 End If
Else
MsgBox("Resultliste windream is nothing!", MsgBoxStyle.Exclamation, CURR_CHOICE_LIST)
End If End If
End If End If
End If End If
End If
#End Region #End Region
Dim maxWith As Integer = cmb.Width Dim maxWith As Integer = cmb.Width
Using g As Graphics = Me.CreateGraphics Using g As Graphics = Me.CreateGraphics
For Each oItem As Object In cmb.Items 'Für alle Einträge... For Each oItem As Object In cmb.Items 'Für alle Einträge...
Dim g1 As Graphics = cmb.CreateGraphics Dim g1 As Graphics = cmb.CreateGraphics
If g1.MeasureString(Text, cmb.Font).Width + 30 > maxWith Then If g1.MeasureString(Text, cmb.Font).Width + 30 > maxWith Then
maxWith = g1.MeasureString(Text, cmb.Font).Width + 30 maxWith = g1.MeasureString(Text, cmb.Font).Width + 30
End If End If
g1.Dispose() g1.Dispose()
Next oItem Next oItem
End Using End Using
cmb.DropDownWidth = maxWith cmb.DropDownWidth = maxWith
oControl = cmb
End If
ctrl = cmb
Case "DTP" Case "DTP"
LOGGER.Debug("Versuch DTP zu laden") LOGGER.Debug("Versuch DTP zu laden")
ctrl = ClassControlCreator.CreateExistingDatepicker(oControlRow, False) oControl = ClassControlCreator.CreateExistingDatepicker(oControlRow, False)
Case "DGV" Case "DGV"
LOGGER.Debug("Versuch DGV zu laden") LOGGER.Debug("Versuch DGV zu laden")
Dim dgv = ClassControlCreator.CreateExistingDataGridView(oControlRow, False) Dim dgv = ClassControlCreator.CreateExistingDataGridView(oControlRow, False)
AddHandler dgv.RowValidating, AddressOf onDGVRowValidating AddHandler dgv.RowValidating, AddressOf onDGVRowValidating
ctrl = dgv oControl = dgv
Case "CHK" Case "CHK"
LOGGER.Debug("Versuch Checkbox zu laden") LOGGER.Debug("Versuch Checkbox zu laden")
ctrl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False) oControl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False)
Case "LINE" Case "LINE"
LOGGER.Debug("Versuch Linie zu laden") LOGGER.Debug("Versuch Linie zu laden")
ctrl = ClassControlCreator.CreateExistingLine(oControlRow, False) oControl = ClassControlCreator.CreateExistingLine(oControlRow, False)
Case "LOOKUP" Case "LOOKUP"
Dim lookup As LookupControl2 = ClassControlCreator.CreateExistingLookupControl(oControlRow, False) Dim lookup As LookupControl2 = ClassControlCreator.CreateExistingLookupControl(oControlRow, False)
ctrl = lookup oControl = lookup
lookup.PreventDuplicates = oControlRow.Item("VKT_PREVENT_MULTIPLE_VALUES") lookup.PreventDuplicates = oControlRow.Item("VKT_PREVENT_MULTIPLE_VALUES")
lookup.AllowAddNewValues = oControlRow.Item("VKT_ADD_ITEM") lookup.AllowAddNewValues = oControlRow.Item("VKT_ADD_ITEM")
lookup.MultiSelect = oControlRow.Item("MULTISELECT") lookup.MultiSelect = oControlRow.Item("MULTISELECT")
@@ -312,7 +321,7 @@ Public Class frmMassValidator
''Wenn Multiselect false dann prüfen ob abhängiges Control ''Wenn Multiselect false dann prüfen ob abhängiges Control
If CBool(oControlRow.Item("MULTISELECT")) = False Then If CBool(oControlRow.Item("MULTISELECT")) = False Then
Dim filteredData As DataTable = DTCONTROLS.Clone() Dim filteredData As DataTable = DTCONTROLS.Clone()
Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{ctrl.Name}%'" Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{oControl.Name}%'"
DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges) DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges)
If filteredData.Rows.Count = 1 Then If filteredData.Rows.Count = 1 Then
AddHandler lookup.SelectedValuesChanged, AddressOf onLookUp1 AddHandler lookup.SelectedValuesChanged, AddressOf onLookUp1
@@ -329,14 +338,14 @@ Public Class frmMassValidator
Where r.CONTROL_ID = oControlRow.Item("GUID") Where r.CONTROL_ID = oControlRow.Item("GUID")
Select r).ToList() Select r).ToList()
ctrl = ClassControlCreator.CreateExistingGridControl(oControlRow, columns, False) oControl = ClassControlCreator.CreateExistingGridControl(oControlRow, columns, False)
End Select End Select
If ctrl IsNot Nothing AndAlso TypeOf ctrl IsNot Label Then If oControl IsNot Nothing AndAlso TypeOf oControl IsNot Label Then
ctrl.TabIndex = oCount oControl.TabIndex = oCount
End If End If
pnldesigner.Controls.Add(ctrl) pnldesigner.Controls.Add(oControl)
oCount += 1 oCount += 1
Next Next

View File

@@ -662,144 +662,157 @@ Public Class frmValidator
oMyControl = ClassControlCreator.CreateExistingLabel(oControlRow, False) oMyControl = ClassControlCreator.CreateExistingLabel(oControlRow, False)
Case "CMB" Case "CMB"
LOGGER.Debug("Versuch CMB zu laden") LOGGER.Debug("Versuch CMB zu laden")
If oControlRow.Item("READ_ONLY") Then
Dim cmbReadonly = ClassControlCreator.CreateExistingTextbox(oControlRow, False)
oMyControl = cmbReadonly
Else
Dim cmb = ClassControlCreator.CreateExistingCombobox(oControlRow, False)
Dim cmb = ClassControlCreator.CreateExistingCombobox(oControlRow, False) AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
AddHandler cmb.GotFocus, Sub(sender As Control, e As EventArgs)
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex If DirectCast(cmb.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
cmb.BackColor = Color.Lime
End If
End Sub
AddHandler cmb.LostFocus, Sub(sender As Control, e As EventArgs)
If DirectCast(cmb.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
cmb.BackColor = Color.White
End If
End Sub
#Region "CONTROL LIST" #Region "CONTROL LIST"
Dim ControlID = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetGUID(CURRENT_ProfilGUID, cmb.Name) Dim ControlID = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetGUID(CURRENT_ProfilGUID, cmb.Name)
LOGGER.Debug("In add_ComboBox - GUID: " & ControlID) LOGGER.Debug("In add_ComboBox - GUID: " & ControlID)
If ControlID > 0 Then If ControlID > 0 Then
LOGGER.Debug(" >>ControlID > 0") LOGGER.Debug(" >>ControlID > 0")
Dim ConID = Me.TBPM_PROFILE_CONTROLSTableAdapter.cmdgetConnectionID(ControlID) Dim ConID = Me.TBPM_PROFILE_CONTROLSTableAdapter.cmdgetConnectionID(ControlID)
If ConID Is Nothing = False Then If ConID Is Nothing = False Then
Dim commandsql = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID) Dim commandsql = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID)
LOGGER.Debug("ConID Is Nothing = False") LOGGER.Debug("ConID Is Nothing = False")
If ConID > 0 And commandsql <> "" Then If ConID > 0 And commandsql <> "" Then
LOGGER.Debug("CConID > 0 And TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID)") LOGGER.Debug("CConID > 0 And TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID)")
Dim connectionString As String Dim connectionString As String
TBDD_CONNECTIONTableAdapter.FillByID(DD_DMSLiteDataSet.TBDD_CONNECTION, ConID) TBDD_CONNECTIONTableAdapter.FillByID(DD_DMSLiteDataSet.TBDD_CONNECTION, ConID)
Dim DTConnection As DataTable = DD_DMSLiteDataSet.TBDD_CONNECTION Dim DTConnection As DataTable = DD_DMSLiteDataSet.TBDD_CONNECTION
Dim drConnection As DataRow Dim drConnection As DataRow
For Each drConnection In DTConnection.Rows For Each drConnection In DTConnection.Rows
Select Case drConnection.Item("SQL_PROVIDER").ToString.ToLower Select Case drConnection.Item("SQL_PROVIDER").ToString.ToLower
Case "ms-sql" Case "ms-sql"
If drConnection.Item("USERNAME") = "WINAUTH" Then If drConnection.Item("USERNAME") = "WINAUTH" Then
connectionString = "Data Source=" & drConnection.Item("SERVER") & ";Initial Catalog=" & drConnection.Item("DATENBANK") & ";Trusted_Connection=True;" connectionString = "Data Source=" & drConnection.Item("SERVER") & ";Initial Catalog=" & drConnection.Item("DATENBANK") & ";Trusted_Connection=True;"
Else Else
connectionString = "Data Source=" & drConnection.Item("SERVER") & ";Initial Catalog= " & drConnection.Item("DATENBANK") & ";User Id=" & drConnection.Item("USERNAME") & ";Password=" & drConnection.Item("PASSWORD") & ";" connectionString = "Data Source=" & drConnection.Item("SERVER") & ";Initial Catalog= " & drConnection.Item("DATENBANK") & ";User Id=" & drConnection.Item("USERNAME") & ";Password=" & drConnection.Item("PASSWORD") & ";"
End If End If
LOGGER.Debug("ConnString Sql-Server: " & connectionString) LOGGER.Debug("ConnString Sql-Server: " & connectionString)
Case "oracle" Case "oracle"
Dim conn As New OracleConnectionStringBuilder Dim conn As New OracleConnectionStringBuilder
Dim connstr As String Dim connstr As String
If drConnection.Item("SERVER") <> "" And drConnection.Item("DATENBANK").GetType.ToString <> "system.dbnull" Then If drConnection.Item("SERVER") <> "" And drConnection.Item("DATENBANK").GetType.ToString <> "system.dbnull" Then
connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & drConnection.Item("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" & connstr = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & drConnection.Item("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" &
drConnection.Item("DATENBANK") & ")));User Id=" & drConnection.Item("USERNAME") & ";Password=" & drConnection.Item("PASSWORD") & ";" drConnection.Item("DATENBANK") & ")));User Id=" & drConnection.Item("USERNAME") & ";Password=" & drConnection.Item("PASSWORD") & ";"
Else Else
conn.DataSource = drConnection.Item("SERVER") conn.DataSource = drConnection.Item("SERVER")
conn.UserID = drConnection.Item("USERNAME") conn.UserID = drConnection.Item("USERNAME")
conn.Password = drConnection.Item("PASSWORD") conn.Password = drConnection.Item("PASSWORD")
conn.PersistSecurityInfo = True conn.PersistSecurityInfo = True
conn.ConnectionTimeout = 120 conn.ConnectionTimeout = 120
connstr = conn.ConnectionString connstr = conn.ConnectionString
End If End If
connectionString = connstr connectionString = connstr
Case Else Case Else
LOGGER.Info(" - ConnectionType nicht integriert") LOGGER.Info(" - ConnectionType nicht integriert")
MsgBox("ConnectionType nicht integriert", MsgBoxStyle.Critical, "Bitte Konfiguration Connection überprüfen!") MsgBox("ConnectionType nicht integriert", MsgBoxStyle.Critical, "Bitte Konfiguration Connection überprüfen!")
End Select End Select
Next
If connectionString Is Nothing = False Then
Try
Dim sqlCnn As SqlClient.SqlConnection
Dim sqlCmd As SqlClient.SqlCommand
Dim adapter As New SqlClient.SqlDataAdapter
Dim NewDataset As New DataSet
Dim i As Integer
Dim sql As String
sql = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID)
'sql = ClassPatterns.ReplaceAllValues(sql, pnldesigner, CURRENT_WMFILE)
'If ClassPatterns.HasOnlySimplePatterns(sql) Then
If clsPatterns.HasOnlySimplePatterns(sql) Then
sql = clsPatterns.ReplaceInternalValues(sql)
sql = clsPatterns.ReplaceControlValues(sql, pnldesigner)
LOGGER.Debug(">>> sql after HasOnlySimplePatterns: " & sql)
sqlCnn = New SqlClient.SqlConnection(connectionString)
' Try
sqlCnn.Open()
sqlCmd = New SqlClient.SqlCommand(sql, sqlCnn)
adapter.SelectCommand = sqlCmd
adapter.Fill(NewDataset)
Dim msg As String
For i = 0 To NewDataset.Tables(0).Rows.Count - 1
cmb.Items.Add(NewDataset.Tables(0).Rows(i).Item(0))
Next
adapter.Dispose()
sqlCmd.Dispose()
sqlCnn.Close()
End If
Catch ex As Exception
LOGGER.Error(ex)
LOGGER.Info(" - Unvorhergesehener Fehler bei GetValues SQL - Fehler: " & vbNewLine & ex.Message)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei GetValues SQL:")
End Try
End If
Else
LOGGER.Debug("Else Row 571")
End If
Else
LOGGER.Debug("AListe Handling")
Dim AListe As String = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetChoiceListName(ControlID)
LOGGER.Debug("In add_ComboBox - AListe: " & AListe)
If AListe Is Nothing = False Then
'Dim liste = _windreamPM.GetValuesfromAuswahlliste(AListe)
Dim liste = WINDREAM.GetValuesfromAuswahlliste(AListe)
If liste IsNot Nothing Then
cmb.Items.Add("")
For Each index As String In liste
cmb.Items.Add(index)
Next Next
cmb.SelectedIndex = -1 If connectionString Is Nothing = False Then
Try
Dim sqlCnn As SqlClient.SqlConnection
Dim sqlCmd As SqlClient.SqlCommand
Dim adapter As New SqlClient.SqlDataAdapter
Dim NewDataset As New DataSet
Dim i As Integer
Dim sql As String
sql = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID)
'sql = ClassPatterns.ReplaceAllValues(sql, pnldesigner, CURRENT_WMFILE)
'If ClassPatterns.HasOnlySimplePatterns(sql) Then
If clsPatterns.HasOnlySimplePatterns(sql) Then
sql = clsPatterns.ReplaceInternalValues(sql)
sql = clsPatterns.ReplaceControlValues(sql, pnldesigner)
LOGGER.Debug(">>> sql after HasOnlySimplePatterns: " & sql)
sqlCnn = New SqlClient.SqlConnection(connectionString)
' Try
sqlCnn.Open()
sqlCmd = New SqlClient.SqlCommand(sql, sqlCnn)
adapter.SelectCommand = sqlCmd
adapter.Fill(NewDataset)
Dim msg As String
For i = 0 To NewDataset.Tables(0).Rows.Count - 1
cmb.Items.Add(NewDataset.Tables(0).Rows(i).Item(0))
Next
adapter.Dispose()
sqlCmd.Dispose()
sqlCnn.Close()
End If
Catch ex As Exception
LOGGER.Error(ex)
LOGGER.Info(" - Unvorhergesehener Fehler bei GetValues SQL - Fehler: " & vbNewLine & ex.Message)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei GetValues SQL:")
End Try
End If
Else Else
MsgBox("Resultliste windream is nothing!", MsgBoxStyle.Exclamation, AListe) LOGGER.Debug("Else Row 571")
End If End If
Else Else
MsgBox("AListe from database is nothing!", MsgBoxStyle.Exclamation, AListe) LOGGER.Debug("AListe Handling")
Dim AListe As String = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetChoiceListName(ControlID)
LOGGER.Debug("In add_ComboBox - AListe: " & AListe)
If AListe Is Nothing = False Then
'Dim liste = _windreamPM.GetValuesfromAuswahlliste(AListe)
Dim liste = WINDREAM.GetValuesfromAuswahlliste(AListe)
If liste IsNot Nothing Then
cmb.Items.Add("")
For Each index As String In liste
cmb.Items.Add(index)
Next
cmb.SelectedIndex = -1
Else
MsgBox("Resultliste windream is nothing!", MsgBoxStyle.Exclamation, AListe)
End If
Else
MsgBox("AListe from database is nothing!", MsgBoxStyle.Exclamation, AListe)
End If
End If End If
End If End If
End If
#End Region #End Region
Dim maxWith As Integer = cmb.Width Dim maxWith As Integer = cmb.Width
Using g As Graphics = Me.CreateGraphics Using g As Graphics = Me.CreateGraphics
For Each oItem As Object In cmb.Items 'Für alle Einträge... For Each oItem As Object In cmb.Items 'Für alle Einträge...
Dim g1 As Graphics = cmb.CreateGraphics Dim g1 As Graphics = cmb.CreateGraphics
If g1.MeasureString(Text, cmb.Font).Width + 30 > maxWith Then If g1.MeasureString(Text, cmb.Font).Width + 30 > maxWith Then
maxWith = g1.MeasureString(Text, cmb.Font).Width + 30 maxWith = g1.MeasureString(Text, cmb.Font).Width + 30
End If End If
g1.Dispose() g1.Dispose()
Next oItem Next oItem
End Using End Using
cmb.DropDownWidth = maxWith cmb.DropDownWidth = maxWith
oMyControl = cmb
End If
oMyControl = cmb
'add_ComboBox(dr.Item("GUID"), dr.Item("CTRL_NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), CInt(dr.Item("WIDTH")), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
Case "DTP" Case "DTP"
LOGGER.Debug("Versuch DTP zu laden") LOGGER.Debug("Versuch DTP zu laden")
oMyControl = ClassControlCreator.CreateExistingDatepicker(oControlRow, False) oMyControl = ClassControlCreator.CreateExistingDatepicker(oControlRow, False)
'add_DTP(dr.Item("GUID"), dr.Item("NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), CInt(dr.Item("WIDTH")), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
Case "DGV" Case "DGV"
LOGGER.Debug("Versuch DGV zu laden") LOGGER.Debug("Versuch DGV zu laden")
Dim dgv = ClassControlCreator.CreateExistingDataGridView(oControlRow, False) Dim dgv = ClassControlCreator.CreateExistingDataGridView(oControlRow, False)
@@ -832,15 +845,24 @@ Public Class frmValidator
End If End If
End If End If
AddHandler lookup.GotFocus, Sub(sender As Control, e As EventArgs)
If DirectCast(lookup.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
lookup.BackColor = Color.Lime
End If
End Sub
AddHandler lookup.LostFocus, Sub(sender As Control, e As EventArgs)
If DirectCast(lookup.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
lookup.BackColor = Color.White
End If
End Sub
'Return filteredData 'Return filteredData
'AddHandler lookup.Leave, AddressOf onLookUp0 'AddHandler lookup.Leave, AddressOf onLookUp0
'add_DGV(dr.Item("GUID"), dr.Item("CTRL_NAME"), dr.Item("HEIGHT"), dr.Item("WIDTH"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
Case "CHK" Case "CHK"
LOGGER.Debug("Versuch Checkbox zu laden") LOGGER.Debug("Versuch Checkbox zu laden")
oMyControl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False) oMyControl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False)
'add_Checkbox(dr.Item("GUID"), dr.Item("CTRL_NAME"), dr.Item("CTRL_TEXT"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE"))
Case "TABLE" Case "TABLE"
LOGGER.Debug("Versuch Tabelle zu laden") LOGGER.Debug("Versuch Tabelle zu laden")
@@ -909,12 +931,18 @@ Public Class frmValidator
Public Sub OnTextBoxFocus(sender As Object, e As EventArgs) Public Sub OnTextBoxFocus(sender As Object, e As EventArgs)
Dim box As TextBox = sender Dim box As TextBox = sender
box.BackColor = Color.Lime
box.SelectAll() If DirectCast(box.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
box.BackColor = Color.Lime
box.SelectAll()
End If
End Sub End Sub
Public Sub OnTextBoxLostFocus(sender As System.Object, e As System.EventArgs) Public Sub OnTextBoxLostFocus(sender As System.Object, e As System.EventArgs)
Dim box As TextBox = sender Dim box As TextBox = sender
box.BackColor = Color.White
If DirectCast(box.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then
box.BackColor = Color.White
End If
End Sub End Sub
Public Sub OnTextBoxKeyUp(sender As Object, e As KeyEventArgs) Public Sub OnTextBoxKeyUp(sender As Object, e As KeyEventArgs)
If ControlHandleStarted = True Then If ControlHandleStarted = True Then