📄 yushouchaxun.aspx
字号:
<%@ Page Language="c#" CodeBehind="yushouchaxun.aspx.cs" AutoEventWireup="false" Inherits="software.yushouchaxun" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<HTML>
<HEAD>
<title>yushouchaxun</title>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<script runat="server">
private void submit_button2(object sender, System.EventArgs e)
{
Response.Redirect("WebForm2.aspx");
}
private void Button1_Click(object sender, System.EventArgs e)
{
SqlConnection Conn;
Conn=new SqlConnection("server=HWADEE-1G30;database=HTserverData;uid=sa;pwd=''");
Conn.Open();
string sql="select * from YuYue where ArrTime between '"+date1.Text+"' and '"+dates.Text+"'" ;
// return;
SqlCommand Comm=new SqlCommand(sql,Conn);
SqlDataReader dr=Comm.ExecuteReader();
dg.DataSource=dr;
dg.DataBind();
Conn.Close();
}
</script>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body bgColor="#339933" text="#ffffff">
<form id="Form1" method="post" runat="server">
<P><FONT face="宋体"> </FONT>
<asp:TextBox id="TextBox1" runat="server" Width="512px" Height="72px" BackColor="#FFC0C0" BorderColor="Yellow"
Font-Names="华文彩云" Font-Size="XX-Large" ForeColor="MediumPurple">无双酒店预售查询系统</asp:TextBox></P>
<P>
请输入你要查询的起始日期:<BR>
<asp:TextBox id="date1" runat="server" size="50"></asp:TextBox><br>
请输入你要查询的末尾日期:<br>
<asp:TextBox id="dates" size="50" runat="server" /><FONT face="宋体">
</FONT>
<asp:Button id="Button1" OnClick="Button1_Click" runat="server" Text="查询"></asp:Button>
<br>
<asp:label id="Message" runat="server" /></P>
<asp:DataGrid id="dg" runat="server" />
<P>
<asp:Button id="Button2" OnClick="submit_button2" runat="server" Text="返回" Height="36px" Width="74px"></asp:Button></P>
<P>
<FONT face="宋体"> </P>
</FONT>
</form>
</body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -