📄 keshouchaxun.aspx
字号:
<%@ Page Language="c#" CodeBehind="keshouchaxun.aspx.cs" AutoEventWireup="false" Inherits="software.keshouchaxun" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<body bgColor="#339933" text="#ffffff">
<script runat="server">
void submit_Click(Object sender,EventArgs e) {
SqlConnection Conn;
Conn=new SqlConnection("server=HWADEE-1G30;database=HTserverData;uid=sa;pwd=''");
Conn.Open();
string sql="select * from room";
sql="select ( RmStatus.RoomNum )房间号码 from RoomInfo,RmStatus where RoomInfo.RoomSta='净' and RmStatus.RoomSta='空闲'and RmStatus.RoomNum=RoomInfo.RoomNum";
SqlCommand Comm=new SqlCommand(sql,Conn);
SqlDataReader dr=Comm.ExecuteReader();
dg.DataSource=dr;
dg.DataBind();
Conn.Close();
}
private void submit_button1(object sender, System.EventArgs e)
{
Response.Redirect("WebForm2.aspx");
}
</script>
<b>
无双酒店可售客房查询</b><br>
<form name="myform" runat="server" ID="Form1">
<FONT face="宋体">
</FONT>
<asp:Button id="submit" onClick="submit_Click" runat="server" Text="查询"></asp:Button><br>
<FONT face="宋体">
</FONT>
<asp:label id="Message" runat="server" /><br>
<FONT face="宋体"> </FONT>
<asp:DataGrid id="dg" runat="server" Width="344px" />
<P><FONT face="宋体"></FONT> </P>
<P> </P>
<P> </P>
<P><FONT face="宋体">
</FONT>
<asp:Button id="Button1" OnClick="submit_button1" runat="server" Text="返回" Width="56px"></asp:Button></P>
</form>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -