This repository has been archived by the owner on Feb 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrinterFriendly.aspx
47 lines (41 loc) · 1.95 KB
/
PrinterFriendly.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
35
36
37
38
39
40
41
42
43
44
45
46
47
<%@ page title="Table Selection" language="C#" masterpagefile="~/Site.master" autoeventwireup="true" CodeFile="PrinterFriendly.aspx.cs" Inherits="_Default"%>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
Reservation listing
</h2>
<div style="color: Red">
<%
String writeValue = "<p>" + errorMessage + "</p>";
Response.Write(writeValue);
%>
</div>
<div style="margin-top:20px">
<%
Response.Write("<table border=1 id='printTable'>" +
"<thead><tr><th>Table</th><th>Chairs</th><th>Email</th><th>Name</th><th>School</th><th>Phone</th><th>Comment</th></tr></thead></tbody>");
foreach (TableGroup singleTable in tableList.Values)
{
if (singleTable.chairs.Count > 0)
{
List<Person> tableOccupants = new List<Person>();
foreach (Chair singleChair in singleTable.chairs.Distinct())
{
Response.Write("<td>" + singleTable.tableNumber + "</td>");
Response.Write("<td>" + singleTable.seatsTaken() + "</td>");
Response.Write("<td>" + singleChair.occupant.email + "</td>");
Response.Write("<td>" + singleChair.occupant.name + "</td>");
Response.Write("<td>" + singleChair.occupant.school + "</td>");
Response.Write("<td>" + singleChair.occupant.phone + "</td>");
Response.Write("<td>" + singleChair.occupant.comment + "</td></tr>");
}
}
}
Response.Write("</tbody></table>\n");
%>
</div>
<asp:DataGrid ID="tableListings" runat="server"
CellPadding="4" ForeColor="#333333" AutoGenerateColumns="true" Width="900">
</asp:DataGrid>
</asp:Content>