日期:2014-05-16 浏览次数:20469 次
protected void btnSearch_Click(object sender, EventArgs e)
{
DateTime begindate,enddate;
try
{
begindate = DateTime.Parse(Request.Form["beginDate"].ToString());
enddate = DateTime.Parse(Request.Form["endDate"].ToString());
}
catch (Exception ex)
{
Response.Write("<script>alert('" +ex.Message + "');</script>");
return;
}
DAL.DALVIP dv=new DAL.DALVIP();
DataTable dt = dv.tj(begindate, enddate);
GridView1.DataSource = dt;
GridView1.DataBind();
}
<body style="font-size:12px">
<form id="form1" runat="server">
<div>
<table height="100%" width="100%" >
<tr>
<td valign=top>
开始时间:<input class="Wdate" name="beginDate" type="text" onClick="WdatePicker()">
结束时间:<input class="Wdate" name="endDate" type="text" onClick="WdatePicker()">
<asp:Button ID="btnSearch" runat="server" Text="查询" onclick="btnSearch_Click" />
</td>
</tr>
<tr>
&nb