<%@ Page Language="C#" AutoEventWireup="true" CodeFile="query.aspx.cs" Inherits="general_dormitory_query" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="../../styles/1/style.css" rel="stylesheet" type="text/css" />
</head>
<body class="bodycolor" style=";text-align:center;">
    <form id="form1" runat="server">
    <div class="center" style="width:780px">
    <fieldset>
                <legend>信息查询</legend>
                <div style="width: 90%; float: left;">
                    <asp:Label ID="Label1" runat="server" Text="姓名："></asp:Label><asp:TextBox
                            ID="TextBox1" runat="server"></asp:TextBox>                 
                    <asp:Label ID="Label2" runat="server" Text="性别："></asp:Label>
                    <asp:DropDownList ID="DropDownList1" runat="server" Width="100px">
                        <asp:ListItem Selected="True"></asp:ListItem>
                        <asp:ListItem>男</asp:ListItem>
                        <asp:ListItem>女</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label3" runat="server" Text="房间号："></asp:Label><asp:TextBox
                            ID="TextBox3" runat="server"></asp:TextBox>
                    <asp:Button ID="Button1" runat="server" CssClass="BigButton" Text="查询" OnClick="Button1_Click" /></div>
            </fieldset> 
           <br /> 
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="身份证号" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" OnRowDataBound="GridView1_RowDataBound">
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <Columns>
                <asp:BoundField DataField="房间号" HeaderText="房间号" SortExpression="房间号" />
                <asp:BoundField DataField="姓名" HeaderText="姓名" SortExpression="姓名" />
                <asp:BoundField DataField="性别" HeaderText="性别" SortExpression="性别" />
                <asp:BoundField DataField="手机号" HeaderText="手机号" SortExpression="手机号" />
                <asp:BoundField DataField="身份证号" HeaderText="身份证号" ReadOnly="True" SortExpression="身份证号" />
                <asp:BoundField DataField="班号" HeaderText="班号" SortExpression="班号" />
                <asp:BoundField DataField="入住时间" HeaderText="入住时间" SortExpression="入住时间" />
            </Columns>
            <RowStyle BackColor="#E3EAEB" />
            <EditRowStyle BackColor="#7C6F57" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
    </div>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:hqglConnectionString %>"
            SelectCommand="SELECT [房间号], [姓名], [性别], [手机号], [身份证号], [班号], [入住时间] FROM [std_inf]">
        </asp:SqlDataSource>
    </form>
</body>
</html>
