[Visual Basic] Private Sub ComboboxMAParameter_SelectedIndexChanged( _
ByVal sender As Object, _
ByVal e As EventArgs _
) Handles _
ComboboxMAParameter.SelectedIndexChanged
[Visual Basic] Private Sub ComboboxMAParameter_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboboxMAParameter.SelectedIndexChanged
If Me.On_Load = True Then Exit Sub
Try
Dim s As String = ""
For Each dr As DataRow In Me.auswertungen.MitarbeiterAuswertungsparameter.Rows
If dr.Item("Mitarbeiter_AuswertungsparameterNr") = Me.ComboboxMAParameter.SelectedValue Then
s = dr.Item("Parameterdaten")
Me.txtTitel1.Text = dr.Item("Titelzeile1")
Me.txtTitel2.Text = dr.Item("Titelzeile2")
Me.checkboxprintparam.Checked = dr.Item("ParamPrint")
End If
Next
If s = "" Then Exit Sub
Me.Init_Params(False)
Dim grp() As String = s.Split("|")
Dim andor As String = grp(0)
Dim param As String = grp(1)
Dim op As String = grp(2)
Dim val As String = grp(3)
Dim tmpvalue() As String
Dim ValueItem() As String
Dim tmpparam() As String
Dim ParamItem() As String
Dim tmpop() As String
Dim opItem() As String
Dim tmpandor() As String
Dim andorItem() As String
Dim tmpcbidx As Integer
Dim vals() As String
Dim CTLIndex As Integer
Dim CTLAndOr As String
Dim CTLParam As String
Dim CTLOP As String
Dim CTLValue As String
Dim CTLSplit() As String
Dim SelIndexSet As Boolean
Dim i As Integer
For i = 6 To 0 Step -1
tmpvalue = val.ToString.Split(";")
If tmpvalue(i).ToString.Length > 2 Then
ValueItem = tmpvalue(i).Split("~")
CTLIndex = ValueItem(0)
CTLValue = ValueItem(1)
tmpparam = param.Split(";")
ParamItem = tmpparam(i).Split("~")
CTLParam = ParamItem(1)
tmpop = op.Split(";")
opItem = tmpop(i).Split("~")
CTLOP = opItem(1)
If i > 1 Then
tmpandor = andor.Split(";")
andorItem = tmpandor(i - 1).Split("~")
CTLAndOr = andorItem(1)
End If
'Parameter
Dim l As New List(Of Control)
Me.GetControl(Me, "cbparam" + Trim(Str(CTLIndex)), l)
Dim x As ComboBox = l(0)
SelIndexSet = False
Dim ii As Integer = 0
For ii = 0 To x.Items.Count - 1
If x.Items(ii).ToString = CTLParam Then
x.SelectedIndex = ii
SelIndexSet = True
End If
Next
If SelIndexSet = False Then x.Text = CTLParam
'Operator
l.Clear()
Me.GetControl(Me, "cbop" + Trim(Str(CTLIndex)), l)
x = l(0)
SelIndexSet = False
For ii = 0 To x.Items.Count - 1
If x.Items(ii).ToString = CTLOP Then
x.SelectedIndex = ii
SelIndexSet = True
End If
Next
If SelIndexSet = False Then x.Text = CTLOP
'value
l.Clear()
Me.GetControl(Me, "cbvalue" + Trim(Str(CTLIndex)), l)
x = l(0)
SelIndexSet = False
For ii = 0 To x.Items.Count - 1
If x.Items(ii).ToString = CTLValue Then
x.SelectedIndex = ii
SelIndexSet = True
End If
Next
If SelIndexSet = False Then x.Text = CTLValue
'andor
l.Clear()
Me.GetControl(Me, "cbandor" + Trim(Str(CTLIndex)), l)
x = l(0)
SelIndexSet = False
For ii = 0 To x.Items.Count - 1
If x.Items(ii).ToString = CTLAndOr Then
x.SelectedIndex = ii
SelIndexSet = True
End If
Next
If SelIndexSet = False Then x.Text = CTLAndOr
End If
Next
Catch ex As Exception
End Try
End Sub
Plattformen: Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition