jj: work on depending controls
This commit is contained in:
parent
06001ccf8d
commit
5d6dc32e22
@ -1227,16 +1227,15 @@ Public Class frmValidator
|
|||||||
input_value = cmb1.Text
|
input_value = cmb1.Text
|
||||||
End If
|
End If
|
||||||
sql_Statement = sql_Statement.ToString.Replace(element.Value, input_value)
|
sql_Statement = sql_Statement.ToString.Replace(element.Value, input_value)
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(">>> sql_Statement: " & sql_Statement)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassLogger.Add("Unexpected Error in Checking control values for Variable SQL Result ComboBox - ERROR: " & ex.Message)
|
ClassLogger.Add("Unexpected Error in Checking control values for Variable SQL Result ComboBox - ERROR: " & ex.Message)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim resultDT As DataTable = ClassDatabase.Return_Datatable_CS(sql_Statement, ROW.Item(1))
|
Dim resultDT As DataTable = ClassDatabase.Return_Datatable_CS(sql_Statement, ROW.Item(1))
|
||||||
If resultDT.Rows.Count >= 1 Then
|
If resultDT.Rows.Count = 1 Then
|
||||||
'Nur dediziert einen Wert zurückerhalten
|
'Nur dediziert einen Wert zurückerhalten
|
||||||
For Each row1 As DataRow In resultDT.Rows
|
For Each row1 As DataRow In resultDT.Rows
|
||||||
Dim result = row1.Item(0)
|
Dim result = row1.Item(0)
|
||||||
@ -1248,6 +1247,15 @@ Public Class frmValidator
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
ElseIf resultDT.Rows.Count > 1 Then
|
||||||
|
'Ist das Control ein Control was mehrfachwerte enthalten kann
|
||||||
|
If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Then
|
||||||
|
|
||||||
|
Else
|
||||||
|
MsgBox("Result contains more than one rows!", MsgBoxStyle.Information)
|
||||||
|
|
||||||
|
End If
|
||||||
|
' wenn ja: dann datasource an control anpassen
|
||||||
Else
|
Else
|
||||||
pnldesigner.Controls(displayboxname).Text = "NO RESULT"
|
pnldesigner.Controls(displayboxname).Text = "NO RESULT"
|
||||||
End If
|
End If
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user