<%@ Page language="vb" Codebehind="ProjectReport.aspx.vb" AutoEventWireup="false" Inherits="ASPNET.StarterKit.TimeTracker.Web.ProjectReport" %>
<%@ Register TagPrefix="TimeTrack" TagName="Banner" Src="Banner.ascx" %>
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>Project 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="ProjectReport" 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="BackLink" Text='< Back to Reports' Runat="server">
					<
					
					
					
					
					 返回報表</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" cellSpacing="11" cellPadding="0" width="100%" border="0" height="526">
							<tbody>
								<tr vAlign="top">
									<td>
										<asp:label id="NoData" runat="server" CssClass="header-gray" Visible="False">沒有取得相關資料。</asp:label>
										<asp:datalist id="ProjectList" RepeatColumns="1" RepeatDirection="Vertical" runat="server">
											<headerstyle cssclass="header-gray" />
											<headertemplate>
												專案報表
											</headertemplate>
											<itemtemplate>
												<table border="0" cellpadding="0" cellspacing="0" class="Content" width="100%">
													<tr>
														<td valign="top">&nbsp;</td>
													</tr>
													<tr>
														<td>
															<table border="0" cellpadding="0" cellspacing="0" class="Content" width="100%">
																<tr>
																	<td width="180" class="report-main-header">專案名稱</td>
																	<td width="70" align="right" class="report-main-header">預計時數</td>
																	<td width="100" align="right" class="report-main-header">實際時數</td>
																	<td width="150" class="report-main-header">預計完成</td>
																</tr>
																<tr>
																	<td class="report-text"><%# DataBinder.Eval(Container.DataItem, "ProjectName") %></td>
																	<td class="report-text" align="right"><%# DataBinder.Eval(Container.DataItem, "EstHours") %></td>
																	<td class="report-text" align="right"><%# DataBinder.Eval(Container.DataItem, "ActualHours") %></td>
																	<td class="report-text"><%# DataBinder.Eval(Container.DataItem, "EstCompletionDate", "{0:d}") %></td>
																</tr>
															</table>
														</td>
													</tr>
													<tr>
														<td valign="top">&nbsp;</td>
													</tr>
													<tr>
														<td>
															<asp:datalist id="CategoryList" RepeatColumns="1" RepeatDirection="Vertical" DataSource='<%# ListCategory(CInt(DataBinder.Eval(Container.DataItem, "ProjectID"))) %>' runat="server">
															<itemtemplate>
																	<table border="0" cellpadding="0" cellspacing="0" class="Content" width="100%">
																		<tr>
																			<td height="12" width="105"><img height="1" src="images/spacer.gif" width="1"></td>
																			<td valign="top" width="72" class="report-header">Category</td>
																			<td valign="top" width="70" align="right" class="report-header">Est. Hours</td>
																			<td valign="top" width="100" align="right" class="report-header">Actual Hours</td>
																		</tr>
																		<tr>
																			<td height="12" width="105"><img height="1" src="images/spacer.gif" width="1"></td>
																			<td valign="top" class="report-text"><%# DataBinder.Eval(Container.DataItem, "CategoryShortName") %></td>
																			<td valign="top" class="report-text" align="right"><%# DataBinder.Eval(Container.DataItem, "EstDuration") %></td>
																			<td valign="top" class="report-text" align="right"><%# DataBinder.Eval(Container.DataItem, "ActualHours") %></td>
																		</tr>
																		<tr>
																			<td valign="top" colspan="4"><img height="15" src="images/spacer.gif" width="1"></td>
																		</tr>
																		<tr>
																			<td valign="top" colspan="2">&nbsp;</td>
																			<td colspan="2">
																				<asp:datalist id="EntryList" Width="100%" RepeatColumns="1" RepeatDirection="Vertical" DataSource='<%# ListTimeEntries(CInt(DataBinder.Eval(Container.DataItem, "CategoryID"))) %>' runat="server">
																					<headertemplate>
																						<table border="0" cellpadding="0" cellspacing="0" class="Content" width="100%">
																							<tr>
																								<td valign="top" align="left" class="report-header">Consultant</td>
																								<td valign="top" align="right" class="report-header">Hours</td>
																							</tr>
																					</headertemplate>
																					<itemtemplate>
																						<tr>
																							<td valign="top" class="report-text">
																								<a href='ResourceReport.aspx?index=<%# _pageIndex %>&IDs=<%# DataBinder.Eval(Container.DataItem, "UserID") %>&Start=<%#(CDate(DataBinder.Eval(Container.DataItem, "MinEntryDate"))).ToShortDateString()%>&End=<%#(CDate(DataBinder.Eval(Container.DataItem, "MaxEntryDate"))).ToShortDateString()%>'>
																									<%# DataBinder.Eval(Container.DataItem, "FullName") %>
																								</a>
																							</td>
																							<td valign="top" class="report-text" align="right"><%# DataBinder.Eval(Container.DataItem, "Duration") %></td>
																						</tr>
																					</itemtemplate>
																					<footertemplate>
																	</table>
																				</FooterTemplate>
																			</asp:datalist>
														</td>
													</tr>
													<tr>
														<td height="25" valign="top" colspan="4"><img height="1" src="images/spacer.gif" width="1"></td>
													</tr>
												</table>
											</itemtemplate>
										</asp:datalist>
									</td>
								</tr>
						</table>
						</itemtemplate> </asp:datalist>
					</td>
				</tr>
			</table>
			</TD></TR>
			<tr>
				<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" Text='< Back to Reports' Runat="server">
				<
				
				
				 返回報表</asp:hyperlink>
				</td>
			</tr>
			<tr>
				<td vAlign="top" height="15" colspan="5"><img height="15" src="images/spacer.gif" width="15"></td>
			</tr>
			</TBODY></TABLE>
		</form>
	</body>
</HTML>
