温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:酒店管理系统(三层开发)源码
当前文件:
ThreeLayerHotel/WebSite_hotel/UserReception.aspx,打开代码结构图
ThreeLayerHotel/WebSite_hotel/UserReception.aspx,打开代码结构图1<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="UserReception.aspx.cs" Inherits="UserReception" Title="无标题页" %> 2
3
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> 4
<style type="text/css"> 5
.style21 6
{ 7
width: 100%; 8
} 9
</style> 10
</asp:Content> 11
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 12
<br /> 13
<asp:UpdatePanel ID="UpdatePanel2" runat="server"> 14
<ContentTemplate> 15
<table class="style21"> 16
<tr> 17
<td align="left"> 18
19
<asp:DropDownList ID="ddl" runat="server"> 20
<asp:ListItem>--查询方式--</asp:ListItem> 21
<asp:ListItem>用户ID</asp:ListItem> 22
<asp:ListItem>姓名</asp:ListItem> 23
</asp:DropDownList> 24
<asp:CompareValidator ID="CompareValidator1" runat="server" 25
ControlToValidate="ddl" ErrorMessage="*" Operator="NotEqual" 26
ValueToCompare="--查询方式--"></asp:CompareValidator> 27
28
<asp:TextBox ID="txtfilter" runat="server"></asp:TextBox> 29
30
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 31
ControlToValidate="txtfilter" ErrorMessage="*"></asp:RequiredFieldValidator> 32
</td> 33
<td align="left"> 34
<asp:LinkButton ID="LinkButton11" runat="server" ForeColor="Blue" 35
onclick="LinkButton11_Click">查询数据</asp:LinkButton> 36
</td> 37
<td align="center"> 38
39
<asp:LinkButton ID="LinkButton12" runat="server" ForeColor="Blue" 40
onclick="LinkButton12_Click" CausesValidation="False">查询所有</asp:LinkButton> 41
</td> 42
</tr> 43
<tr> 44
<td align="left" colspan="2"> 45
</td> 46
<td align="center"> 47
</td> 48
</tr> 49
<tr> 50
<td colspan="3"> 51
<asp:MultiView ID="MultiView4" runat="server"> 52
<asp:View ID="View7" runat="server"> 53
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" 54
AutoGenerateColumns="False" DataKeyNames="RoomID" Height="69px" PageSize="5" 55
Width="573px" onpageindexchanging="GridView1_PageIndexChanging" 56
onselectedindexchanged="GridView1_SelectedIndexChanged" CellPadding="4" 57
ForeColor="#333333" GridLines="None" 58
onrowdatabound="GridView1_RowDataBound"> 59
<PagerSettings FirstPageText="1" LastPageText="<<" 60
NextPageText="&gt;>>" PageButtonCount="5" /> 61
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> 62
<RowStyle BackColor="#EFF3FB" /> 63
<Columns> 64
<asp:BoundField DataField="UserName" HeaderText="用户ID" /> 65
<asp:BoundField DataField="Name" HeaderText="姓名" /> 66
<asp:BoundField DataField="Number" HeaderText="房间号" /> 67
<asp:BoundField DataField="TypeName" HeaderText="房间类型" /> 68
<asp:BoundField DataField="State" HeaderText="房间状态" /> 69
<asp:TemplateField> 70
<ItemTemplate> 71
<asp:LinkButton ID="LinkButton1" runat="server" CommandName="Select" 72
CausesValidation="False" ToolTip="将“已预订”的房间号修改为“入住状态”" 73
ForeColor="Blue">更改状态</asp:LinkButton> 74
</ItemTemplate> 75
</asp:TemplateField> 76
</Columns> 77
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> 78
<EmptyDataTemplate> 79
<asp:Label ID="Label1" runat="server" Text="没有查询到数据!"></asp:Label> 80
</EmptyDataTemplate> 81
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> 82
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> 83
<EditRowStyle BackColor="#2461BF" /> 84
<AlternatingRowStyle BackColor="White" /> 85
</asp:GridView> 86
</asp:View> 87
<asp:View ID="View8" runat="server"> 88
<asp:GridView ID="GridView2" runat="server" AllowPaging="True" 89
AutoGenerateColumns="False" DataKeyNames="RoomID" Height="69px" 90
onpageindexchanging="GridView2_PageIndexChanging" 91
onselectedindexchanged="GridView2_SelectedIndexChanged" PageSize="5" 92
Width="573px" CellPadding="4" ForeColor="#333333" GridLines="None" 93
onrowdatabound="GridView2_RowDataBound"> 94
<PagerSettings FirstPageText="1" LastPageText="<<" 95
NextPageText="&gt;>>" PageButtonCount="5" /> 96
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> 97
<RowStyle BackColor="#EFF3FB" /> 98
<Columns> 99
<asp:BoundField DataField="UserName" HeaderText="用户ID" /> 100
<asp:BoundField DataField="Name" HeaderText="姓名" /> 101
<asp:BoundField DataField="Number" HeaderText="房间号" /> 102
<asp:BoundField DataField="TypeName" HeaderText="房间类型" /> 103
<asp:BoundField DataField="State" HeaderText="房间状态" /> 104
<asp:TemplateField> 105
<ItemTemplate> 106
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 107
CommandName="Select" ToolTip="将“已预订”的房间号修改为“入住状态”" ForeColor="Blue">更改状态</asp:LinkButton> 108
</ItemTemplate> 109
</asp:TemplateField> 110
</Columns> 111
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> 112
<EmptyDataTemplate> 113
<asp:Label ID="Label2" runat="server" Text="没有查询到数据!"></asp:Label> 114
</EmptyDataTemplate> 115
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> 116
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> 117
<EditRowStyle BackColor="#2461BF" /> 118
<AlternatingRowStyle BackColor="White" /> 119
</asp:GridView> 120
</asp:View> 121
</asp:MultiView> 122
</td> 123
</tr> 124
</table> 125
</ContentTemplate> 126
</asp:UpdatePanel> 127
</asp:Content> 128
129



.style21

