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

📄 bookform.aspx

📁 一个关于宾馆酒店管理系统的源代码
💻 ASPX
字号:
<%--文件名:BookForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="BookForm.aspx.cs" Inherits="RoomManage_BookForm" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width: 560px; height: 203px">
        <tr>
            <td align="center" colspan="2" style="font-size: 0.8em; width: 384px; font-family: 宋体;
                height: 21px; background-color: slategray">
                请选择酒店房间类别:<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
                    Width="81px">
                    <asp:ListItem>单人间</asp:ListItem>
                    <asp:ListItem>双人间</asp:ListItem>
                    <asp:ListItem>三人间</asp:ListItem>
                    <asp:ListItem>四人间</asp:ListItem>
                    <asp:ListItem>豪华间</asp:ListItem>
                    <asp:ListItem>钟点房</asp:ListItem>
                    <asp:ListItem>棋牌室</asp:ListItem>
                    <asp:ListItem>会议室</asp:ListItem>
                    <asp:ListItem>其他项1</asp:ListItem>
                    <asp:ListItem>其他项2</asp:ListItem>
                    <asp:ListItem>其他项3</asp:ListItem>
                    <asp:ListItem>其他项4</asp:ListItem>
                    <asp:ListItem>其他项5</asp:ListItem>
                </asp:DropDownList><asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
                    Text="打印" Width="80px" /><asp:Button ID="Button2" runat="server" OnClick="Button2_Click"
                        Text="保存" Width="80px" /></td>
            <td align="center" colspan="2" style="font-size: 0.8em; width: 187px; font-family: 宋体;
                height: 21px; background-color: slategray">
                设置旅客预订客房信息</td>
        </tr>
        <tr>
            <td align="left" colspan="2" rowspan="1" style="width: 384px; height: 207px; background-color: gainsboro">
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None"
                    BorderWidth="1px" CellPadding="3" DataKeyNames="房号" DataSourceID="SqlDataSource1"
                    Font-Names="宋体" Font-Size="Small" GridLines="Vertical" Height="33px" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
                    PageSize="6" Width="375px">
                    <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="可住人数" />
                        <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" />
                    <AlternatingRowStyle BackColor="Gainsboro" />
                </asp:GridView>
            </td>
            <td align="left" colspan="2" style="font-size: 0.8em; width: 187px; font-family: 宋体;
                height: 207px; background-color: gainsboro">
                预约房号:<asp:TextBox ID="TextBox2" runat="server" BackColor="Silver" ReadOnly="True"
                    Width="107px"></asp:TextBox>预收押金:<asp:TextBox ID="TextBox4" runat="server" Width="107px">100</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="DropDownList3" runat="server"
                                    Width="112px">
                                    <asp:ListItem>1</asp:ListItem>
                                </asp:DropDownList>客人性别:<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="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyHotelDBConnectionString %>"
                    SelectCommand="SELECT [房号], [类别], [楼层], [单价], [可住人数], [已住人数] FROM [酒店房间] WHERE ([类别] LIKE '%' + @类别 + '%')">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownList1" Name="类别" PropertyName="SelectedValue"
                            Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyHotelDBConnectionString %>"
        DeleteCommand="DELETE FROM [客房预约单] WHERE [自编号] = @自编号" InsertCommand="INSERT INTO [客房预约单] ([入住编号], [预约房号], [预收押金], [入住日期], [离开日期], [客人姓名], [住宿人数], [客人性别], [联系电话], [操作人员], [预约说明]) VALUES (@入住编号, @预约房号, @预收押金, @入住日期, @离开日期, @客人姓名, @住宿人数, @客人性别, @联系电话, @操作人员, @预约说明)"
        SelectCommand="SELECT * FROM [客房预约单]" UpdateCommand="UPDATE [客房预约单] SET [入住编号] = @入住编号, [预约房号] = @预约房号, [预收押金] = @预收押金, [入住日期] = @入住日期, [离开日期] = @离开日期, [客人姓名] = @客人姓名, [住宿人数] = @住宿人数, [客人性别] = @客人性别, [联系电话] = @联系电话, [操作人员] = @操作人员, [预约说明] = @预约说明 WHERE [自编号] = @自编号">
        <DeleteParameters>
            <asp:Parameter Name="自编号" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="入住编号" Type="String" />
            <asp:Parameter Name="预约房号" Type="String" />
            <asp:Parameter Name="预收押金" Type="Double" />
            <asp:Parameter Name="入住日期" Type="DateTime" />
            <asp:Parameter Name="离开日期" Type="DateTime" />
            <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" />
            <asp:Parameter Name="自编号" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="入住编号" Type="String" />
            <asp:ControlParameter ControlID="TextBox2" Name="预约房号" PropertyName="Text" Type="String" />
            <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="DropDownList3" Name="住宿人数" PropertyName="SelectedValue"
                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" />
        </InsertParameters>
    </asp:SqlDataSource>
</asp:Content>

⌨️ 快捷键说明

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