<%@ Page language="c#" Codebehind="ResourceReport.aspx.cs" 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>资源报告</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" Text='< 返回报表' Runat="server" />
					</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">
							<tr vAlign="top">
								<td>
									<asp:label id="NoData" runat="server" Visible="False" CssClass="header-gray">没有数据.</asp:label>
									<asp:datalist id="UserList" runat="server" Width="1072px">
										<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 class="report-main-header" width="150">顾问</TD>
													<TD class="report-main-header" align="right" width="78">小时数总计</TD>
													<TD class="report-main-header" width="*">&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 colSpan="3" height="24">&nbsp;</TD>
												</TR>
											</TABLE>
											<TABLE cellSpacing="0" cellPadding="3" width="100%" border="0">
												<TR>
													<TD>
														<asp:datagrid id=TimeEntryGrid runat="server" Width="847px" OnSortCommand="TimeEntryGrid_Sort" BorderColor="White" AllowSorting="True" Font-Name="Verdana" AutoGenerateColumns="False" CellPadding="4" BorderStyle="None" DataSource='<%# ListTimeEntry(TTSecurity.GetUserID(), (int)DataBinder.Eval(Container.DataItem, "UserID"), _startDate, _endDate) %>'>
															<headerstyle Font-Bold="True" CssClass="report-header"></headerstyle>
															<columns>
																<asp:templatecolumn SortExpression="EntryDate" HeaderText="日期">
																	<headerstyle HorizontalAlign="Left" Width="35px" CssClass="report-header" VerticalAlign="Middle"></headerstyle>
																	<itemstyle HorizontalAlign="Left" Width="35px" CssClass="report-text"></itemstyle>
																	<itemtemplate>
																		<%# DataBinder.Eval(Container, "DataItem.EntryDate", "{0:d}") %>
																	</itemtemplate>
																</asp:templatecolumn>
																<asp:templatecolumn SortExpression="ProjectName" HeaderText="项目">
																	<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="目录">
																	<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="小时数">
																	<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="描述">
																	<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" Text='< 返回报表' Runat="server" />
					</td>
				</tr>
				<tr>
					<td vAlign="top" height="15" colspan="5"><img height="15" src="images/spacer.gif" width="15"></td>
				</tr>
			</table>
		</form>
	</body>
</HTML>
