<%@ Page language="vb" Codebehind="ResourceReport.aspx.vb" AutoEventWireup="false" Inherits="ASPNET.StarterKit.TimeTracker.Web.ResourceReportForm" %>
<%@ Register TagPrefix="TimeTrack" TagName="Banner" Src="Banner.ascx" %>
<%@ Import Namespace="ASPNET.StarterKit.TimeTracker.BusinessLogicLayer" %>
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>Resource Report Page</title>
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<LINK href="styles.css" type="text/css" rel="stylesheet">
	</HEAD>
	<body>
		<form id="ResourceReportForm" method="post" runat="server">
			<table cellSpacing="0" cellPadding="0" width="100%" border="0">
				<tr>
					<td vAlign="top" background="images/bars.gif" height="46"><timetrack:banner id="Banner1" runat="server"></timetrack:banner></td>
				</tr>
				<tr>
					<td class="tab-active" vAlign="top" height="15"><IMG height="15" src="images/spacer.gif" width="15"></td>
				</tr>
			</table>
			<table cellSpacing="0" cellPadding="0" width="100%" border="0">
				<tr>
					<td width="11"><IMG height="11" src="images/spacer.gif" width="11"></td>
					<td><asp:hyperlink id="BackLink1" Runat="server" Text="< Back to Reports">
					< 返回報表</asp:hyperlink></td>
				</tr>
				<tr>
					<td width="11" colSpan="2"><IMG height="11" src="images/spacer.gif" width="11">
					</td>
				</tr>
				<tr>
					<td width="11"><IMG height="11" src="images/spacer.gif" width="11"></td>
					<td vAlign="top">
						<table class="tan-border" height="526" cellSpacing="11" cellPadding="0" width="100%" border="0">
							<tr vAlign="top">
								<td><asp:label id="NoData" runat="server" CssClass="header-gray" Visible="False">沒有取得資料。</asp:label><asp:datalist id="UserList" runat="server" Width="100%">
										<headertemplate>
											<table cellSpacing="0" cellPadding="0" width="100%" border="0">
												<tr>
													<td colspan="3" class="header-gray">資源報表</td>
												</tr>
												<tr>
													<td colspan="3">&nbsp;</td>
												</tr>
												<tr>
													<td width="150" class="report-header">起始日期</td>
													<td width="150" class="report-header">結束日期</td>
													<td width="*" class="report-header">&nbsp;</td>
												</tr>
												<tr>
													<td class="report-text">
														<asp:Label ID="StartDate" Runat="server" Text='<%# _startDate.ToString("d") %>' /></td>
													<td class="report-text">
														<asp:Label ID="EndDate" Runat="server" Text='<%# _endDate.ToString("d") %>' /></td>
													<td></td>
												</tr>
												<tr>
													<td colspan="3">&nbsp;</td>
												</tr>
											</table>
										</headertemplate>
										<itemtemplate>
											<table cellSpacing="0" cellPadding="0" width="100%" border="0">
												<tr>
													<td width="150" class="report-main-header">顧問</td>
													<td width="78" align="right" class="report-main-header">總時數</td>
													<td width="*" class="report-main-header">&nbsp;</td>
												</tr>
												<tr>
													<td class="report-text"><%# DataBinder.Eval(Container.DataItem, "FullName") %></td>
													<td class="report-text" align="right"><%# DataBinder.Eval(Container.DataItem, "TotalHours") %></td>
													<td class="report-text">&nbsp;</td>
												</tr>
												<tr>
													<td height="24" colspan="3">&nbsp;</td>
												</tr>
											</table>
											<table cellSpacing="0" cellPadding="3" width="100%" border="0">
												<tr>
													<td>
														<asp:datagrid id="TimeEntryGrid" DataSource='<%# ListTimeEntry(TTSecurity.GetUserID(), CInt(DataBinder.Eval(Container.DataItem, "UserID")), _startDate, _endDate) %>' runat="server" BorderStyle="None" Width="100%" CellPadding="4" AutoGenerateColumns="False" Font-Name="Verdana" AllowSorting="True" BorderColor="White" OnSortCommand="TimeEntryGrid_Sort">
															<headerstyle Font-Bold="True" CssClass="report-header"></headerstyle>
															<columns>
																<asp:templatecolumn SortExpression="EntryDate" HeaderText="Date">
																	<headerstyle HorizontalAlign="Left" Width="25px" CssClass="report-header" VerticalAlign="Middle"></headerstyle>
																	<itemstyle HorizontalAlign="Left" Width="25px" CssClass="report-text"></itemstyle>
																	<itemtemplate>
																		<%# DataBinder.Eval(Container, "DataItem.EntryDate", "{0:d}") %>
																	</itemtemplate>
																</asp:templatecolumn>
																<asp:templatecolumn SortExpression="ProjectName" HeaderText="Project">
																	<headerstyle HorizontalAlign="Left" Width="120px" CssClass="report-header" VerticalAlign="Middle"></headerstyle>
																	<itemstyle CssClass="report-text" Width="120px" Wrap="False"></itemstyle>
																	<itemtemplate>
																		<%# DataBinder.Eval(Container, "DataItem.ProjectName") %>
																	</itemtemplate>
																</asp:templatecolumn>
																<asp:templatecolumn SortExpression="CategoryName" HeaderText="Cat.">
																	<headerstyle HorizontalAlign="Left" Width="20px" CssClass="report-header" VerticalAlign="Middle"></headerstyle>
																	<itemstyle CssClass="report-text" Width="20px"></itemstyle>
																	<itemtemplate>
																		<%# DataBinder.Eval(Container.DataItem, "CategoryShortName") %>
																	</itemtemplate>
																</asp:templatecolumn>
																<asp:templatecolumn SortExpression="Duration" HeaderText="Hrs.">
																	<headerstyle HorizontalAlign="Right" Width="40px" CssClass="report-header" VerticalAlign="Middle"></headerstyle>
																	<itemstyle HorizontalAlign="Right" CssClass="report-text" Width="40px"></itemstyle>
																	<itemtemplate>
																		<%# DataBinder.Eval(Container.DataItem, "Duration", "{0:f}") %>
																	</itemtemplate>
																</asp:templatecolumn>
																<asp:templatecolumn SortExpression="Description" HeaderText="Description">
																	<headerstyle HorizontalAlign="Left" CssClass="report-header" VerticalAlign="Middle"></headerstyle>
																	<itemstyle CssClass="report-text" Wrap="False"></itemstyle>
																	<itemtemplate>
																		<%# DataBinder.Eval(Container, "DataItem.Description") %>
																	</itemtemplate>
																</asp:templatecolumn>
															</columns>
														</asp:datagrid>
													</td>
												</tr>
												<tr>
													<td height="48">&nbsp;</td>
												</tr>
											</table>
										</itemtemplate>
									</asp:datalist></td>
							</tr>
						</table>
					</td>
					<td width="11"><IMG height="11" src="images/spacer.gif" width="11"></td>
				</tr>
				<tr>
					<td width="11" colSpan="2"><IMG height="11" src="images/spacer.gif" width="11"></td>
				</tr>
				<tr>
					<td width="11"><IMG height="11" src="images/spacer.gif" width="11"></td>
					<td><asp:hyperlink id="BackLink2" Runat="server" Text="< Back to Reports">
					< 返回報表</asp:hyperlink></td>
				</tr>
				<tr>
					<td vAlign="top" colSpan="5" height="15"><IMG height="15" src="images/spacer.gif" width="15"></td>
				</tr>
			</table>
		</form>
	</body>
</HTML>
