能详细解释一下这是什么意思吗?
privatevoidBindData(){DataPagedp=newDataPage();//设置查询条件stringwhere="1=1";if(Request.Q...
private void BindData()
{
DataPage dp = new DataPage();
//设置查询条件
string where = " 1=1 ";
if (Request.QueryString["tid"] != null)
{
if (Request.QueryString["tid"] != "0")
{
where += " and tid=" + Request.QueryString["tid"];
}
}
if (Request.QueryString["p1"]!=null)
{
if(Request.QueryString["p1"]!="")
{
where += " and price>=" + Request.QueryString["p1"];
}
}
if (Request.QueryString["p2"] != null)
{
if (Request.QueryString["p2"] != "")
{
where += " and price<=" + Request.QueryString["p2"];
}
}
if (Request.QueryString["k"]!=null)
{
where += " and pname like '%" +Request.QueryString["k"]+"%' ";
}
int recordcount;
int pagesize = this.AspNetPager1.PageSize;
int pageindex = this.AspNetPager1.CurrentPageIndex; 展开
{
DataPage dp = new DataPage();
//设置查询条件
string where = " 1=1 ";
if (Request.QueryString["tid"] != null)
{
if (Request.QueryString["tid"] != "0")
{
where += " and tid=" + Request.QueryString["tid"];
}
}
if (Request.QueryString["p1"]!=null)
{
if(Request.QueryString["p1"]!="")
{
where += " and price>=" + Request.QueryString["p1"];
}
}
if (Request.QueryString["p2"] != null)
{
if (Request.QueryString["p2"] != "")
{
where += " and price<=" + Request.QueryString["p2"];
}
}
if (Request.QueryString["k"]!=null)
{
where += " and pname like '%" +Request.QueryString["k"]+"%' ";
}
int recordcount;
int pagesize = this.AspNetPager1.PageSize;
int pageindex = this.AspNetPager1.CurrentPageIndex; 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询