⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 queryguestform.aspx

📁 一个关于宾馆酒店管理系统的源代码
💻 ASPX
字号:
<%--文件名:QueryGuestForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="QueryGuestForm.aspx.cs" Inherits="QueryManage_QueryGuestForm" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width: 559px; height: 13px">
        <tr>
            <td align="left" colspan="2" style="font-size: 0.8em; width: 384px; font-family: 宋体;
                height: 21px; background-color: slategray">
                请输入酒店客人姓名:<asp:TextBox ID="TextBox8" runat="server" Width="116px">%%</asp:TextBox>
                <asp:Button ID="Button1" runat="server" Text="查询" Width="60px" /><asp:Button ID="Button2"
                    runat="server" Text="修改" Width="60px" OnClick="Button2_Click" /></td>
        </tr>
        <tr>
            <td align="left" style="overflow: auto; width: 380px; height: 321px; background-color: gainsboro">
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                    BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
                    CellPadding="3" DataKeyNames="入住编号" DataSourceID="SqlDataSource1" Font-Names="宋体"
                    Font-Size="Small" GridLines="Vertical" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
                    PageSize="9" Width="367px" HorizontalAlign="Center">
                    <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                    <Columns>
                        <asp:CommandField ButtonType="Button" HeaderText="选择" ShowSelectButton="True" />
                        <asp:BoundField DataField="入住编号" HeaderText="入住编号" ReadOnly="True" SortExpression="入住编号" />
                        <asp:BoundField DataField="入住房号" HeaderText="入住房号" SortExpression="入住房号" />
                        <asp:BoundField DataField="客人姓名" HeaderText="客人姓名" SortExpression="客人姓名" />
                        <asp:BoundField DataField="客人性别" HeaderText="客人性别" SortExpression="客人性别" />
                        <asp:BoundField DataField="住宿人数" HeaderText="住宿人数" SortExpression="住宿人数" />
                    </Columns>
                    <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                    <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                    <AlternatingRowStyle BackColor="Gainsboro" />
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyHotelDBConnectionString %>"
                    SelectCommand="SELECT [入住编号], [入住房号], [客人姓名], [客人性别], [住宿人数] FROM [客房入住单] WHERE ([客人姓名] LIKE '%' + @客人姓名 + '%')">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="TextBox8" Name="客人姓名" PropertyName="Text" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td align="left" style="font-size: 0.8em; width: 279px; font-family: 宋体; height: 321px;
                background-color: gainsboro">
                入住编号:<asp:TextBox ID="TextBox1" runat="server" BackColor="Silver" ReadOnly="True"
                    Width="107px"></asp:TextBox>入住房号:<asp:TextBox ID="TextBox2" runat="server" BackColor="Silver"
                        ReadOnly="True" Width="107px"></asp:TextBox>折扣价格:<asp:TextBox ID="TextBox3" runat="server"
                            Width="107px"></asp:TextBox>预收押金:<asp:TextBox ID="TextBox4" runat="server" BackColor="Silver"
                                ReadOnly="True" Width="107px"></asp:TextBox>入住日期:<asp:TextBox ID="TextBox5" runat="server"
                                    Width="107px"></asp:TextBox>离开日期:<asp:TextBox ID="TextBox6" runat="server" Width="107px"></asp:TextBox>客人姓名:<asp:TextBox
                                        ID="TextBox7" runat="server" Width="107px"></asp:TextBox>证件名称:<asp:DropDownList ID="DropDownList2"
                                            runat="server" Width="112px">
                                            <asp:ListItem>居民身份证</asp:ListItem>
                                            <asp:ListItem>军官证</asp:ListItem>
                                            <asp:ListItem>警官证</asp:ListItem>
                                            <asp:ListItem>学生证</asp:ListItem>
                                            <asp:ListItem>工作证</asp:ListItem>
                                        </asp:DropDownList>证件号码:<asp:TextBox ID="TextBox9" runat="server" Width="107px"></asp:TextBox>证件地址:<asp:TextBox
                                            ID="TextBox10" runat="server" Width="107px"></asp:TextBox>住宿人数:<asp:TextBox ID="TextBox11"
                                                runat="server" BackColor="Silver" ForeColor="Black" Width="105px"></asp:TextBox>客人性别:<asp:DropDownList
                                                    ID="DropDownList4" runat="server" Width="112px">
                                                    <asp:ListItem>男</asp:ListItem>
                                                    <asp:ListItem>女</asp:ListItem>
                                                </asp:DropDownList>联系电话:<asp:TextBox ID="TextBox13" runat="server" Width="107px">13983115123</asp:TextBox>操作人员:<asp:TextBox
                                                    ID="TextBox14" runat="server" BackColor="Silver" ReadOnly="True" Width="107px"></asp:TextBox>登记说明:<asp:TextBox
                                                        ID="TextBox15" runat="server" Width="107px">暂无</asp:TextBox></td>
        </tr>
    </table>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyHotelDBConnectionString %>"
        DeleteCommand="DELETE FROM [客房入住单] WHERE [入住编号] = @入住编号" InsertCommand="INSERT INTO [客房入住单] ([入住编号], [入住房号], [折扣价格], [预收押金], [入住日期], [离开日期], [客人姓名], [证件名称], [证件号码], [证件地址], [住宿人数], [客人性别], [联系电话], [操作人员], [登记说明]) VALUES (@入住编号, @入住房号, @折扣价格, @预收押金, @入住日期, @离开日期, @客人姓名, @证件名称, @证件号码, @证件地址, @住宿人数, @客人性别, @联系电话, @操作人员, @登记说明)"
        SelectCommand="SELECT * FROM [客房入住单] WHERE ([入住编号] = @入住编号)" UpdateCommand="UPDATE [客房入住单] SET [入住房号] = @入住房号, [折扣价格] = @折扣价格, [预收押金] = @预收押金, [入住日期] = @入住日期, [离开日期] = @离开日期, [客人姓名] = @客人姓名, [证件名称] = @证件名称, [证件号码] = @证件号码, [证件地址] = @证件地址, [住宿人数] = @住宿人数, [客人性别] = @客人性别, [联系电话] = @联系电话, [操作人员] = @操作人员, [登记说明] = @登记说明 WHERE [入住编号] = @入住编号">
        <DeleteParameters>
            <asp:Parameter Name="入住编号" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:ControlParameter ControlID="TextBox2" Name="入住房号" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBox3" Name="折扣价格" PropertyName="Text" Type="Double" />
            <asp:ControlParameter ControlID="TextBox4" Name="预收押金" PropertyName="Text" Type="Double" />
            <asp:ControlParameter ControlID="TextBox5" Name="入住日期" PropertyName="Text" Type="DateTime" />
            <asp:ControlParameter ControlID="TextBox6" Name="离开日期" PropertyName="Text" Type="DateTime" />
            <asp:ControlParameter ControlID="TextBox7" Name="客人姓名" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="DropDownList2" Name="证件名称" PropertyName="SelectedValue"
                Type="String" />
            <asp:ControlParameter ControlID="TextBox9" Name="证件号码" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBox10" Name="证件地址" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBox11" Name="住宿人数" PropertyName="Text" Type="Int32" />
            <asp:ControlParameter ControlID="DropDownList4" Name="客人性别" PropertyName="SelectedValue"
                Type="String" />
            <asp:ControlParameter ControlID="TextBox13" Name="联系电话" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBox14" Name="操作人员" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBox15" Name="登记说明" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBox1" Name="入住编号" PropertyName="Text" Type="String" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBox1" Name="入住编号" PropertyName="Text" Type="String" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="入住编号" Type="String" />
            <asp:Parameter Name="入住房号" Type="String" />
            <asp:Parameter Name="折扣价格" Type="Double" />
            <asp:Parameter Name="预收押金" Type="Double" />
            <asp:Parameter Name="入住日期" Type="DateTime" />
            <asp:Parameter Name="离开日期" Type="DateTime" />
            <asp:Parameter Name="客人姓名" Type="String" />
            <asp:Parameter Name="证件名称" Type="String" />
            <asp:Parameter Name="证件号码" Type="String" />
            <asp:Parameter Name="证件地址" Type="String" />
            <asp:Parameter Name="住宿人数" Type="Int32" />
            <asp:Parameter Name="客人性别" Type="String" />
            <asp:Parameter Name="联系电话" Type="String" />
            <asp:Parameter Name="操作人员" Type="String" />
            <asp:Parameter Name="登记说明" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
</asp:Content>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -