. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 87.98.249.37 / Your IP : 216.73.216.208 [ Web Server : Microsoft-IIS/10.0 System : Windows NT NS3076740 10.0 build 17763 (Windows Server 2019) AMD64 User : IWPD_292(growel19p) ( 0) PHP Version : 8.3.12 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Inetpub/vhosts/growel.com/httpdocs/ |
Upload File : |
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GrowelWeb
{
public partial class SearchProducts : System.Web.UI.Page
{
string productquery = "";
public string keyword = "";
protected void Page_Load(object sender, EventArgs e)
{
try
{
keyword = Request["keyword"].ToString();
BindProductSearch();
}
catch (Exception ex)
{
}
}
public void BindProductSearch()
{
//productquery = "select distinct p.product,p.product_displayname from products p inner join subproducts s on p.product=s.product where product_displayname like '%" + keyword + "%' or product_description like '%" + keyword + "%' or subproduct_displayname like '%" + keyword + "%' or subproduct_description like '%" + keyword + "%'";
//string bquery = "select * from product_types where product_type_description like '%" + keyword + "%'";
//string typequery = "select * from product_types where product_type like '%" + keyword + "%'";
//string subquery = "select * from subproducts where subproduct_description like '%" + keyword + "%' or subproduct_displayname like '%" + keyword + "%'";
//DataSet pds = new DataSet();
//AdminService adminService = new AdminService();
//g.OpenConnection();
////try
////{
//g.cmd = new SqlCommand(productquery, g.con);
//g.adpt = new SqlDataAdapter(g.cmd);
//g.adpt.Fill(pds, "Products");
//this.dtlsproducts.DataSource = pds.Tables[0].DefaultView;
//this.dtlsproducts.DataBind();
////}
////catch (Exception ex)
////{
//// throw ex;
////}
//g.CloseConnection();
//// Response.Write(productquery+"<br>");
//g.OpenConnection();
//DataSet bds = new DataSet();
////try
////{
//g.cmd = new SqlCommand(bquery, g.con);
//g.adpt = new SqlDataAdapter(g.cmd);
//g.adpt.Fill(bds, "businesses");
//this.dtlstbusinesses.DataSource = bds.Tables[0].DefaultView;
//this.dtlstbusinesses.DataBind();
//g.CloseConnection();
//g.OpenConnection();
//DataSet nds = new DataSet();
//g.cmd = new SqlCommand(typequery, g.con);
//g.adpt = new SqlDataAdapter(g.cmd);
//g.adpt.Fill(nds, "types");
//this.dtlsttypes.DataSource = nds.Tables[0].DefaultView;
//this.dtlsttypes.DataBind();
////}
////catch (Exception ex)
////{
//// throw ex;
////}
//g.CloseConnection();
//g.OpenConnection();
//DataSet sds = new DataSet();
//// Response.Write(subquery);
//g.cmd = new SqlCommand(subquery, g.con);
//g.adpt = new SqlDataAdapter(g.cmd);
//g.adpt.Fill(sds, "SubProducts");
//this.dtlstsubproducts.DataSource = sds.Tables[0].DefaultView;
//this.dtlstsubproducts.DataBind();
////}
////catch (Exception ex)
////{
//// throw ex;
////}
//g.CloseConnection();
}
protected void btnsearch_Click(object sender, EventArgs e)
{
Response.Redirect("SearchProducts.aspx?keyword=" + this.txtsearch.Text);
}
}
}