string ping = "";
if (txtzszt.Text == "")
{
ping = "";
}
else
{
ping = "Titles like '%" + txtzszt.Text.Trim() + "%' and ";
}
if (txtwdzy.Text == "")
{ }
else
{
ping += "realname like '%" + txtwdzy.Text.Trim() + "%'and ";
} if (this.txtstarttime.Text == "")
{ }
else
{
ping += "log_time like '%" + txtstarttime.Text.Trim() + "%'and ";
}
if (DropDownList1.SelectedItem.Text == "请选择")
{ }
else
{
ping += "leixing='" + DropDownList1.SelectedItem.Text + "'and ";
}
//查出当前节点的启用的数据
string strSql = "select * from zongjie where " + ping + "";
try
{ AspNetPager1.RecordCount = xy.DataALL(strSql).Rows.Count;
lblcount.Text = Convert.ToString(AspNetPager1.RecordCount);
}
catch
{ }
if (txtzszt.Text == "")
{
ping = "";
}
else
{
ping = "Titles like '%" + txtzszt.Text.Trim() + "%' and ";
}
if (txtwdzy.Text == "")
{ }
else
{
ping += "realname like '%" + txtwdzy.Text.Trim() + "%'and ";
} if (this.txtstarttime.Text == "")
{ }
else
{
ping += "log_time like '%" + txtstarttime.Text.Trim() + "%'and ";
}
if (DropDownList1.SelectedItem.Text == "请选择")
{ }
else
{
ping += "leixing='" + DropDownList1.SelectedItem.Text + "'and ";
}
//查出当前节点的启用的数据
string strSql = "select * from zongjie where " + ping + "";
try
{ AspNetPager1.RecordCount = xy.DataALL(strSql).Rows.Count;
lblcount.Text = Convert.ToString(AspNetPager1.RecordCount);
}
catch
{ }
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货