Public Shared Function GetQuery () As String GetQueryFromCms = "" Dim Idcat As String = HttpContext.Current.Request.QueryString("IdCat") Dim IdSubcat As String = HttpContext.Current.Request.QueryString("IdSubCat") Dim SqlTable As String = HttpContext.Current.Request.QueryString("Tb") Dim SqlStr As String = "" Dim Search As String = HttpContext.Current.Request.QueryString("Search") Dim SqlC As String = "" '----- SqlStr = "Select * from " & SqlTable & " where " & SqlCat & SqlC & " order by id desc" GetQueryFromCms = SqlStr End Function
Public Shared Function GetGrid(ByVal xGrid As GridView, ByVal xSqlString As String) As GridView Dim conn As SqlConnection = DB.DbInitConn() Dim dataset As New DataSet Dim adapter As SqlDataAdapter Try adapter = New SqlDataAdapter(xSqlString, conn) adapter.Fill(dataset, "table") xGrid.DataSource = dataset '---------------- xGrid.DataBind() Catch err As Exception GnErrorMessage("GetGridView()", ErrorToString().ToString) Finally conn.Close() End Try Return xGrid End Function
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.