-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathByPartySize.aspx
35 lines (31 loc) · 1.79 KB
/
ByPartySize.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ByPartySize.aspx.cs" Inherits="ByPartySize" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<asp:DataList ID="DataList1" runat="server" DataKeyField="RestaurantID"
DataSourceID="SqlDataSource1" RepeatColumns="4" Width="850px" RepeatDirection="Horizontal">
<ItemTemplate>
<div class="restbox">
<a href='DetailPage.aspx?id=<%# Eval("RestaurantID") %>'>
<img src='images/logo/<%# Eval("LogoImageName") %>' class="logocorners" height="150" width="200" /></a>
<asp:Label ID="TimeLabel" CssClass="timenumber" runat="server" Text='<%# Eval("WaitTime") %>' />
<asp:Label ID="MinuteLabel" CssClass="minutelabel" runat="server" Text=" Minutes" />
</div>
</ItemTemplate>
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:elimiwaitfall2012ConnectionString %>"
SelectCommand="SELECT ri.RestaurantID, ri.LogoImageName,
CASE @WaitTime
WHEN 2 THEN WaitTime2People
WHEN 4 THEN WaitTime4People
WHEN 6 THEN WaitTime6orMorePeople
END AS WaitTime
FROM RestaurantImages AS ri INNER JOIN WaitTime AS wt ON wt.RestaurantID = ri.RestaurantID
ORDER BY WaitTime;">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="2" Name="WaitTime"
QueryStringField="party" />
</SelectParameters>
</asp:SqlDataSource>
</asp:Content>