Torna al Thread

For Each ctrl In Me.Panel1.Controls If TypeOf (ctrl) Is TextBox Then If Not CType(ctrl, TextBox).Text.Equals("") Then WhereCondition = WhereCondition & CType(ctrl, TextBox).Tag.ToString() & " LIKE @" & CType(ctrl, TextBox).Tag.ToString() & " AND " cmd.Parameters.AddWithValue("@" & CType(ctrl, TextBox).Tag.ToString(), CType(ctrl, TextBox).Text) End If else If TypeOf (ctrl) Is ComboBox Then If Not CType(ctrl, ComboBox).Text.Equals("") Then WhereCondition = WhereCondition & CType(ctrl, ComboBox).Tag.ToString() & " LIKE @" & CType(ctrl, ComboBox).Tag.ToString() & " AND " cmd.Parameters.AddWithValue("@" & CType(ctrl, ComboBox).Tag.ToString(), CType(ctrl, ComboBox).Text) End If End If Next
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5