<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="PCSWebApp3.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>WebForm1</title>
		<meta content="Microsoft Visual Studio 7.0" 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">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<h2 style="FONT-FAMILY: Arial" align="center">Enter details and set a day to 
				initiate an event.
			</h2>
			<br>
			<table borderColor="#000000" cellSpacing="0" cellPadding="8" rules="none" width="540" align="center" bgColor="#fff99e" border="2">
				<tr>
					<td style="FONT-FAMILY: Arial" vAlign="top" bgColor="#99ff00">Your Name:</td>
					<td vAlign="top" bgColor="#66ffcc"><asp:textbox id="nameBox" Runat="server" Width="160px"></asp:textbox><asp:requiredfieldvalidator id="validateName" Runat="server" ErrorMessage="You must enter a name." ControlToValidate="nameBox" Display="None"></asp:requiredfieldvalidator></td>
					<td vAlign="center" bgColor="#ff9900" rowSpan="4"><asp:calendar id="calendar" Runat="server" ShowGridLines="True" BorderStyle="Double" Font-Names="Arial" Font-Size="Smaller" BackColor="White"></asp:calendar></td>
				</tr>
				<tr>
					<td style="FONT-FAMILY: Arial" vAlign="top" bgColor="#99ff00">Event Name:</td>
					<td vAlign="top" bgColor="#99ff99"><asp:textbox id="eventBox" Runat="server" Width="160px"></asp:textbox><asp:requiredfieldvalidator id="validateEvent" Runat="server" ErrorMessage="You must enter an event name." ControlToValidate="eventBox" Display="None"></asp:requiredfieldvalidator></td>
				</tr>
				<tr>
					<td style="FONT-FAMILY: Arial" vAlign="top" bgColor="#99ff00">Meeting Room:</td>
					<td vAlign="top" bgColor="#00ff99"><asp:dropdownlist id="roomList" Runat="server" Width="160px" DataTextField="Room" DataValueField="ID"></asp:dropdownlist><asp:requiredfieldvalidator id="validateRoom" Runat="server" ErrorMessage="You must select a room." ControlToValidate="roomList" Display="None"></asp:requiredfieldvalidator></td>
				</tr>
				<tr>
					<td style="FONT-FAMILY: Arial" vAlign="top" bgColor="#99ff00">Attendees:</td>
					<td vAlign="top" bgColor="#66ff99"><asp:listbox id="attendeeList" Runat="server" Width="160px" DataTextField="Name" DataValueField="ID" SelectionMode="Multiple" Rows="6"></asp:listbox><asp:requiredfieldvalidator id="validateAttendees" Runat="server" ErrorMessage="You must have at least one attendee." ControlToValidate="attendeeList" Display="None"></asp:requiredfieldvalidator></td>
				</tr>
				<tr>
					<td align="middle" bgColor="#99ff00" colSpan="3">
						<asp:button id="submitButton" Runat="server" Width="197px" Text="Submit meeting room request"></asp:button>
					</td>
				</tr>
				<tr>
					<td align="middle" bgColor="#99ff00" colSpan="3"><asp:validationsummary id="validationSummary" Runat="server" Font-Names="Arial" HeaderText="Before submitting your request:"></asp:validationsummary></td>
				</tr>
				<tr>
					<td align="left" width="100%" bgColor="#99ff00" colSpan="3">
						<table style="WIDTH: 485px; HEIGHT: 136px" cellSpacing="4" cols="4">
							<tr>
								<td width="40%" bgColor="#ccffcc">
									<asp:datalist id="eventDetails2" Runat="server" Font-Names="Arial" Font-Size="Smaller" OnSelectedIndexChanged="eventDetails2_SelectedIndexChanged" Height="69px">
										<SelectedItemTemplate>
											<b>
												<%# DataBinder.Eval(Container.DataItem, "Name") %>
											</b>
											<br>
										</SelectedItemTemplate>
										<ItemTemplate>
											<asp:LinkButton Runat="server" CommandName="Select" ForeColor="#0000ff" ID="Linkbutton1" CausesValidation="False">
												<%# DataBinder.Eval(Container.DataItem, "Name") %>
											</asp:LinkButton>
											<br>
										</ItemTemplate>
									</asp:datalist></td>
								<td vAlign="top">
									<P><asp:label id="edName" Runat="server" Font-Names="Arial" Font-Size="Medium" Font-Italic="True" Font-Bold="True" Font-Name="Arial">
										Select an event to view details.
										</asp:label><BR>
										<asp:label id="edDate" Runat="server" Font-Names="Arial" Font-Size="Smaller"></asp:label><br>
										<asp:label id="edRoom" Runat="server" Font-Names="Arial" Font-Size="Smaller"></asp:label><br>
										<asp:label id="edAttendees" Runat="server" Font-Names="Arial" Font-Size="Smaller"></asp:label></P>
									<P>
										<asp:Button id="Button1" runat="server" Text="Delete Event"></asp:Button></P>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<br>
			<center><font style="FONT-FAMILY: Arial">Results:</font>
				<asp:label id="resultLabel" Runat="server" Font-Names="Arial" Text="None.">None.</asp:label></center>
			<br>
			<br>
			<asp:DataGrid Runat="server" ID="eventDetails1" BackColor="#FFFFC0" Font-Size="Smaller" Font-Names="Arial" BorderStyle="Solid" BorderWidth="2px" BorderColor="Gray" CellPadding="2" HorizontalAlign="Center" AutoGenerateColumns="False">
				<HeaderStyle Font-Size="Small" Font-Names="Arial" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
				<Columns>
					<asp:BoundColumn DataField="ID" HeaderText="Event ID">
						<ItemStyle HorizontalAlign="Right"></ItemStyle>
					</asp:BoundColumn>
					<asp:BoundColumn DataField="Room" HeaderText="Room">
						<ItemStyle HorizontalAlign="Right"></ItemStyle>
					</asp:BoundColumn>
					<asp:BoundColumn DataField="AttendeeList" HeaderText="Attendee List">
						<ItemStyle HorizontalAlign="Left"></ItemStyle>
					</asp:BoundColumn>
					<asp:BoundColumn DataField="EventDate" HeaderText="Event Date">
						<ItemStyle Wrap="False" HorizontalAlign="Left"></ItemStyle>
					</asp:BoundColumn>
				</Columns>
			</asp:DataGrid></form>
	</body>
</HTML>
