110,567
社区成员
发帖
与我相关
我的任务
分享
<select name="adddate" size="1" >
<option selected value="">请选择</option>
<option value="0">今天</option>
<option value="3">最近三天</option>
<option value="7">最近一周</option>
<option value="30">最近一个月</option>
</select>
if (PageValidate.IsDigit(Request, "adddate") != string.Empty)
{
adddate = Request["adddate"];
}
switch(adddate)
{
case "0":
wheres += " and Datediff(day,adddate,getdate())<adddate";
break;
case "3":
wheres += " and Datediff(day,adddate,getdate())<adddate";
break;
case "7":
wheres += " and Datediff(day,adddate,getdate())<adddate";
break;
case "30":
wheres += " and Datediff(day,adddate,getdate())<adddate";
break;
default:
break;
}
<select name="appdate" size="1" >
<option selected value="">请选择</option>
<option value="-7">未来一周</option>
<option value="-3">未来三天</option>
<option value="-2">后天</option>
<option value="-1">明天</option>
<option value="0">今天</option>
</select>
switch (appdate)
{
case "-7":
wheres += " and Datediff(day,appdate,getdate())<" + appdate;
break;
case "-3":
wheres += " and Datediff(day,appdate,getdate())<" + appdate;
break;
case "-2":
wheres += " and Datediff(day,appdate,getdate())=" + appdate;
break;
case "-1":
wheres += " and Datediff(day,appdate,getdate())=" + appdate;
break;
case "0":
wheres += " and Datediff(day,appdate,getdate())=" + appdate;
break;
default:
break;
}
if (PageValidate.IsDigit(Request, "adddate") != string.Empty)
{
adddate = Request["adddate"];
}
switch(adddate)
{
case "0":
wheres += " and Datediff(day,adddate,getdate())="+adddate;
break;
case "3":
wheres += " and Datediff(day,adddate,getdate())<"+adddate;
break;
case "7":
wheres +=" and Datediff(day,adddate,getdate())<"+adddate;
break;
case "30":
wheres += " and Datediff(day,adddate,getdate())<"+adddate;
break;
default:
break;
}
string page = Request["page"];
Page PageClass = new Page(tables, "id,username,tel,email,respective_projects,(select top 1 tname from customer_users where id=" + tables + ".userid) as rname,adddate,(select top 1 id from customer_alone_record where comid=" + tables + ".id) as reid", wheres, "id", "1", "id", "" + urls + "?keywords=" + keyword + "&page=", 30, page, "");
PageClass.Get_Content(newslist);
pagestring.Text = PageClass.Get_Page();