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

📄 queryflight.aspx

📁 ASP.net实现的在线航空订票查询系统
💻 ASPX
字号:
<%@ Page language="c#" Codebehind="QueryFlight.aspx.cs" AutoEventWireup="false" Inherits="Aptech.AirTicket.Web.Flight.QueryFlight" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>QueryFlight</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<LINK href="css/css.css" type="text/css" rel="stylesheet">
		<script language="javascript">
			function ShowDetail(object)
			{
				table = object.parentElement.parentElement.parentElement;
				if(table.rows(1).style.display == "none")
				{
					table.rows(1).style.display = "block";
					object.innerText = "-"	
				}
				else
				{
					table.rows(1).style.display = "none";
					object.innerText = "+";	
				}
			}
			function ShowAll()
			{
				var divs = document.getElementsByTagName("div");
				for(var i = 1; i < divs.length; i ++)
				{
					ShowDetail(divs[i]);
				}	
			}	
		</script>
	</HEAD>
	<body bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0" MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<FONT face="宋体">
				<TABLE id="Table1" cellSpacing="0" cellPadding="4" border="0">
					<TR>
						<TD vAlign="top">
							<TABLE id="Table2" style="BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid"
								cellSpacing="0" cellPadding="2" border="0">
								<TR>
									<TD vAlign="top" noWrap align="left" bgColor="inactivecaptiontext" colSpan="2" height="22"><FONT face="宋体" color="#000000">&gt;&gt;查询机票</FONT></TD>
								</TR>
								<TR>
									<TD noWrap align="right">起飞城市:</TD>
									<TD><asp:dropdownlist id="ddlDepartureCity" runat="server" Width="80px"></asp:dropdownlist></TD>
								</TR>
								<TR>
									<TD align="right">到达城市:</TD>
									<TD><asp:dropdownlist id="ddlArrivalCity" runat="server" Width="80px"></asp:dropdownlist></TD>
								</TR>
								<TR>
									<TD align="right">最小日期:</TD>
									<TD><asp:textbox id="txtBeginDate" runat="server" Width="80px"></asp:textbox></TD>
								</TR>
								<TR>
									<TD align="right">最大日期:</TD>
									<TD><asp:textbox id="txtEndDate" runat="server" Width="80px"></asp:textbox></TD>
								</TR>
								<TR>
									<TD align="center" colSpan="2" height="40"><asp:imagebutton id="btnSearch" runat="server" ImageUrl="images/btn_search.gif"></asp:imagebutton></TD>
								</TR>
							</TABLE>
						</TD>
						<TD vAlign="top" width="480"><asp:datagrid id="dtgFlight" runat="server" Width="640px" GridLines="None" BorderColor="White"
								CellPadding="0" BorderStyle="Ridge" BorderWidth="0px" BackColor="White" PageSize="5" AutoGenerateColumns="False">
								<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#9471DE"></SelectedItemStyle>
								<ItemStyle ForeColor="Black" BackColor="#DEDFDE"></ItemStyle>
								<HeaderStyle Font-Bold="True" ForeColor="#E7E7FF" BackColor="#4A3C8C"></HeaderStyle>
								<FooterStyle ForeColor="Black" BackColor="#C6C3C6"></FooterStyle>
								<Columns>
									<asp:TemplateColumn>
										<HeaderTemplate>
											<TABLE id="Table35" style="BORDER-RIGHT: #e6e6e6 1px solid; BORDER-TOP: medium none; BORDER-LEFT: #e6e6e6 1px solid; COLOR: white; BORDER-BOTTOM: #e6e6e6 1px solid; BORDER-COLLAPSE: collapse"
												borderColor="white" cellSpacing="0" cellPadding="0" width="100%" bgColor="white" border="1">
												<TR bgColor="#cccccc" height="23">
													<TD align="center" width="3%">
														<DIV style="CURSOR: hand" onclick="ShowAll();">+</DIV>
													</TD>
													<TD width="17%">航班号
													</TD>
													<TD width="20%">起飞城市
													</TD>
													<TD width="20%">到达城市
													</TD>
													<TD width="20%">起飞时间
													</TD>
													<TD width="20%">到达时间
													</TD>
												</TR>
											</TABLE>
										</HeaderTemplate>
										<ItemTemplate>
											<TABLE id="Table3" style="BORDER-RIGHT: #e6e6e6 1px solid; BORDER-TOP: medium none; BORDER-LEFT: #e6e6e6 1px solid; BORDER-BOTTOM: #e6e6e6 1px solid; BORDER-COLLAPSE: collapse"
												borderColor="white" cellSpacing="0" cellPadding="0" width="100%" border="1">
												<TR height="24">
													<TD align="center" width="3%">
														<DIV style="CURSOR: hand" onclick="ShowDetail(this);">+</DIV>
													</TD>
													<TD width="17%">
														<asp:Label id=lblFlightName runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.FlightName") %>'>
														</asp:Label></TD>
													<TD width="20%">
														<asp:Label id=lblDepartureCityName runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.DepartureCityName") %>'>
														</asp:Label></TD>
													<TD width="20%">
														<asp:Label id=lblArrivalCityName runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ArrivalCityName") %>'>
														</asp:Label></TD>
													<TD width="20%">
														<asp:Label id=lblDepartureTime runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.DepartureTime") %>'>
														</asp:Label></TD>
													<TD width="20%">
														<asp:Label id=lblArrivalTime runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ArrivalTime") %>'>
														</asp:Label></TD>
												</TR>
												<TR style="DISPLAY: none">
													<TD width="3%" bgColor="white"></TD>
													<TD align="center" colSpan="5">
														<asp:datagrid id="dtgCabin" runat="server" Width="100%" CellPadding="1" BorderStyle="None" BorderWidth="0px"
															BackColor="WhiteSmoke" PageSize="5" AutoGenerateColumns="False" CellSpacing="1">
															<AlternatingItemStyle Height="18px"></AlternatingItemStyle>
															<ItemStyle BackColor="White"></ItemStyle>
															<HeaderStyle BackColor="Info"></HeaderStyle>
															<Columns>
																<asp:BoundColumn Visible="False" DataField="CabinId"></asp:BoundColumn>
																<asp:BoundColumn DataField="CabinName" HeaderText="舱位代码">
																	<HeaderStyle Width="17%"></HeaderStyle>
																</asp:BoundColumn>
																<asp:BoundColumn DataField="Type" HeaderText="舱位种类">
																	<HeaderStyle Width="20%"></HeaderStyle>
																</asp:BoundColumn>
																<asp:BoundColumn DataField="RemainTickets" HeaderText="剩余票数">
																	<HeaderStyle Width="20%"></HeaderStyle>
																</asp:BoundColumn>
																<asp:BoundColumn DataField="Price" HeaderText="价格">
																	<HeaderStyle Width="20%"></HeaderStyle>
																</asp:BoundColumn>
																<asp:BoundColumn DataField="Discount" HeaderText="折扣">
																	<HeaderStyle Width="20%"></HeaderStyle>
																</asp:BoundColumn>
															</Columns>
															<PagerStyle HorizontalAlign="Right" BackColor="White" Mode="NumericPages"></PagerStyle>
														</asp:datagrid></TD>
												</TR>
											</TABLE>
										</ItemTemplate>
										<EditItemTemplate>
											<FONT face="宋体"></FONT>
										</EditItemTemplate>
									</asp:TemplateColumn>
								</Columns>
								<PagerStyle HorizontalAlign="Right" ForeColor="Black" BackColor="#C6C3C6"></PagerStyle>
							</asp:datagrid><asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" ErrorMessage="请输入最小日期" ControlToValidate="txtBeginDate"
								Display="None">请输入最小日期</asp:requiredfieldvalidator><asp:requiredfieldvalidator id="RequiredFieldValidator2" runat="server" ErrorMessage="请输入最大日期" ControlToValidate="txtEndDate"
								Display="None">请输入最大日期</asp:requiredfieldvalidator><asp:comparevalidator id="CompareValidator1" runat="server" ErrorMessage="起飞城市和到达城市不能相同" ControlToValidate="ddlDepartureCity"
								Display="None" ControlToCompare="ddlArrivalCity" Operator="NotEqual" Type="Integer">起飞城市和到达城市不能相同</asp:comparevalidator><asp:comparevalidator id="CompareValidator2" runat="server" ErrorMessage="最小日期不能大于最大日期" ControlToValidate="txtEndDate"
								Display="None" ControlToCompare="txtBeginDate" Operator="GreaterThan" Type="Date">最小日期不能大于最大日期</asp:comparevalidator><asp:validationsummary id="ValidationSummary1" runat="server" DisplayMode="List" ShowMessageBox="True"
								ShowSummary="False"></asp:validationsummary><asp:regularexpressionvalidator id="RegularExpressionValidator1" runat="server" ErrorMessage="最小日期格式错误" ControlToValidate="txtBeginDate"
								Display="None" ValidationExpression="((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$">最小日期格式错误</asp:regularexpressionvalidator><asp:regularexpressionvalidator id="RegularExpressionValidator2" runat="server" ErrorMessage="最大日期格式错误" ControlToValidate="txtEndDate"
								Display="None" ValidationExpression="((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$">大</asp:regularexpressionvalidator></TD>
					</TR>
					<TR>
						<TD></TD>
						<TD><FONT face="宋体"></FONT></TD>
					</TR>
				</TABLE>
			</FONT>
		</form>
	</body>
</HTML>

⌨️ 快捷键说明

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