<%@ Register TagPrefix="uc1" TagName="AdminTabs" Src="AdminTabs.ascx" %>
<%@ Register TagPrefix="TimeTracker" TagName="Banner" Src="Banner.ascx" %>
<%@ Page language="c#" Codebehind="ProjectDetails.aspx.cs" AutoEventWireup="false" Inherits="ASPNET.StarterKit.TimeTracker.Web.ProjectDetails" %>
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>Project Details</title>
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<LINK href="styles.css" type="text/css" rel="stylesheet">
		<script language="javascript" src="script.js"></script>
	</HEAD>
	<body>
		<form id="ProjectDetails" method="post" runat="server">
			<table cellSpacing="0" cellPadding="0" width="100%" border="0">
				<tr>
					<td vAlign="top" background="images/bars.gif" height="46"><timetracker:banner id="Banner1" runat="server"></timetracker: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="8"><IMG height="8" src="images/spacer.gif" width="8"></td>
					<td vAlign="top">
						<table class="admin-tan-border" cellSpacing="20" cellPadding="0" width="600" border="0">
							<tr height="10">
								<td vAlign="top">
									<table cellSpacing="0" cellPadding="0" width="100%" border="0">
										<tr>
											<td class="header-gray">项目配置</td>
											<td align="right"><asp:button id="SaveButton" runat="server" width="53px" CssClass="standard-text" Text="保存"></asp:button>&nbsp;&nbsp;
												<asp:button id="CancelButton" runat="server" width="53" CssClass="standard-text" Text="取消" causesvalidation="False"></asp:button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
												<asp:button id="DeleteButton" runat="server" CssClass="standard-text" Text="删除" causesvalidation="False"
													Width="45px"></asp:button></td>
										</tr>
										<tr>
											<td colSpan="2"><asp:label id="ErrorMessage" runat="server" CssClass="standard-text" ForeColor="Red" enableviewstate="False"></asp:label>
												<hr>
												首先定义项目并指定参与项目的人员。 而后在项目中创建目录以帮助追踪项目中每一个特定的方面 请点击<b>保存</b> 以使项目配置生效
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr height="*">
								<td vAlign="top">
									<table cellSpacing="0" cellPadding="0" width="100%" border="0">
										<tr>
											<td class="header-lightgray" width="240">项目信息
											</td>
											<td width="*"><IMG height="1" src="images/spacer.gif" width="240"></td>
											<td class="header-lightgray" width="240">指定项目成员
											</td>
										</tr>
										<tr>
											<td colSpan="3"><IMG height="11" src="images/spacer.gif" width="1"></td>
										</tr>
										<tr height="*">
											<td vAlign="top">
												<table cellSpacing="0" cellPadding="0" width="204" border="0">
													<tr>
														<td>项目名称<br>
															<asp:textbox id="ProjectName" runat="server" width="194px" cssclass="standard-text" MaxLength="50"></asp:textbox></td>
													</tr>
													<tr>
														<td><asp:requiredfieldvalidator id="ProjectNameRequiredfieldvalidator" runat="server" ErrorMessage="项目名称不能为空" display="Dynamic"
																ControlToValidate="ProjectName"></asp:requiredfieldvalidator></td>
													</tr>
													<tr>
														<td><IMG height="11" src="images/spacer.gif" width="1"></td>
													</tr>
													<tr>
														<td>项目经理<br>
															<asp:dropdownlist id="Managers" runat="server" width="193px" cssclass="standard-text"></asp:dropdownlist></td>
													</tr>
													<tr>
														<td><asp:requiredfieldvalidator id="ManagerRequiredFieldValidator" runat="server" ErrorMessage="项目经理不能为空" display="Dynamic"
																ControlToValidate="Managers"></asp:requiredfieldvalidator></td>
													</tr>
													<tr>
														<td><IMG height="11" src="images/spacer.gif" width="1"></td>
													</tr>
													<tr>
														<td><IMG height="11" src="images/spacer.gif" width="1"></td>
													</tr>
													<tr>
														<td>
															<table cellSpacing="0" cellPadding="0" width="100%" border="0">
																<tr>
																	<td>预计完成时间</td>
																	<td>预计持续时间</td>
																</tr>
																<tr>
																	<td><asp:textbox id="CompletionDate" runat="server" width="76px" cssclass="standard-text" columns="12"></asp:textbox><A href="javascript:OpenCalendar('CompletionDate', true)"><IMG src="images/icon-calendar.gif" border="0"></A>
																	</td>
																	<td><asp:textbox id="Duration" runat="server" cssclass="standard-text" columns="12" Width="49px"></asp:textbox>小时
																	</td>
																</tr>
															</table>
														</td>
													</tr>
													<tr>
														<td><asp:comparevalidator id="CompletionDateCompareValidator" runat="server" ErrorMessage="日期格式不正确" display="Dynamic"
																operator="DataTypeCheck" type="Date" controltovalidate="CompletionDate"></asp:comparevalidator><asp:requiredfieldvalidator id="CompletionDateRequiredFieldValidator" runat="server" ErrorMessage="预计完成日期不能为空"
																ControlToValidate="CompletionDate" Display="Dynamic"></asp:requiredfieldvalidator><asp:comparevalidator id="DurationCompareValidator" runat="server" ErrorMessage="持续时间必须为整数" ControlToValidate="Duration"
																Display="Dynamic" Operator="DataTypeCheck" Type="Integer"></asp:comparevalidator><asp:requiredfieldvalidator id="DurationRequiredFieldValidator" runat="server" ErrorMessage="持续时间不能为空" ControlToValidate="Duration"
																Display="Dynamic"></asp:requiredfieldvalidator><asp:rangevalidator id="RangeValidator1" runat="server" ErrorMessage="持续时间超出范围" ControlToValidate="Duration"
																Type="Integer" MaximumValue="99999" MinimumValue="0"></asp:rangevalidator></td>
													</tr>
													<tr>
														<td><IMG height="11" src="images/spacer.gif" width="1"></td>
													</tr>
													<tr>
														<td><IMG height="11" src="images/spacer.gif" width="1"></td>
													</tr>
												</table>
											</td>
											<td vAlign="top">描述<br>
												<asp:textbox id="Description" runat="server" cssclass="standard-text" columns="20" Width="204px"
													TextMode="MultiLine" Height="116px" rows="8"></asp:textbox></td>
											<td vAlign="top" noWrap>项目成员 (使用CTRL+Click 进行多选)<br>
												<asp:listbox id="Members" runat="server" cssclass="standard-text" Width="220px" Height="122px"
													rows="9" DataValueField="UserID" DataTextField="UserName" SelectionMode="Multiple"></asp:listbox></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td vAlign="top">
									<table cellSpacing="0" cellPadding="0" width="100%" border="0">
										<tr>
											<td class="header-lightgray" colSpan="3">定义项目目录管理
											</td>
										</tr>
										<tr>
											<td colSpan="3"><IMG height="11" src="images/spacer.gif" width="1"></td>
										</tr>
										<tr>
											<td colSpan="3">有两种方法添加目录。 你可以通过指定名称，缩写（最多4个字符）以及持续时间 （在这个目录中所需花费的时间）来 <b>添加</b> 一个目录 
												也可以将定义在另一个项目中的目录 <b>复制</b> 到该项目中。
											</td>
										</tr>
										<tr>
											<td colSpan="3"><IMG height="11" src="images/spacer.gif" width="1"></td>
										</tr>
										<tr>
											<td width="410">
												<table cellSpacing="0" cellPadding="0" width="100%" border="0">
													<tr>
														<td>名称</td>
														<td>缩写</td>
														<td>持续时间</td>
														<td>&nbsp;</td>
													</tr>
													<tr>
														<td style="HEIGHT: 20px" vAlign="top"><asp:textbox id="CategoryName" runat="server" width="166px" enableviewstate="False" cssclass="standard-text"
																MaxLength="50"></asp:textbox></td>
														<td style="HEIGHT: 20px" vAlign="top"><asp:textbox id="Abbrev" runat="server" width="70px" enableviewstate="False" cssclass="standard-text"></asp:textbox></td>
														<td style="HEIGHT: 20px" vAlign="top"><asp:textbox id="CatDuration" runat="server" width="70px" enableviewstate="False" cssclass="standard-text"></asp:textbox></td>
														<td style="HEIGHT: 20px" vAlign="top" align="right"><asp:button id="AddButton" runat="server" width="46px" CssClass="standard-text" Text="添加"></asp:button></td>
													</tr>
													<tr>
														<td colSpan="4"><asp:comparevalidator id="CatDurationValidator" runat="server" ErrorMessage="目录持续时间必须为整数" ControlToValidate="CatDuration"
																Display="Dynamic" Operator="DataTypeCheck" Type="Integer"></asp:comparevalidator><asp:customvalidator id="AbbrevCustomValidator" runat="server" ErrorMessage="目录缩写不能重复" display="Dynamic"></asp:customvalidator><asp:rangevalidator id="RangeValidator2" runat="server" ErrorMessage="持续时间超出范围" display="Dynamic" ControlToValidate="CatDuration"
																Type="Integer" MaximumValue="99999" MinimumValue="0"></asp:rangevalidator></td>
													</tr>
												</table>
											</td>
											<td class="header-gray" align="center" width="100">&nbsp;或&nbsp;</td>
											<td align="right" width="260">
												<table cellSpacing="0" cellPadding="0" width="100%" border="0">
													<tr>
														<td colSpan="2">从另一个项目中复制目录</td>
													</tr>
													<tr>
														<td><asp:dropdownlist id="Projects" runat="server" width="190px" cssclass="standard-text"></asp:dropdownlist></td>
														<td align="right"><asp:button id="CopyButton" runat="server" width="46" CssClass="standard-text" Text="复制" causesvalidation="False"></asp:button></td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td colSpan="3"><asp:regularexpressionvalidator id="RegularExpressionValidatorAbbrev" runat="server" ErrorMessage="缩写必须为1到4个字符"
													ControlToValidate="Abbrev" Display="Dynamic" ValidationExpression="\S{1,4}"></asp:regularexpressionvalidator><asp:label id="CategoryErrorMessage" runat="server" CssClass="standard-text" ForeColor="Red"
													enableviewstate="False"></asp:label></td>
										</tr>
										<tr>
											<td colSpan="3"><IMG height="11" src="images/spacer.gif" width="1"></td>
										</tr>
										<tr>
											<td>项目目录列表<br>
												<asp:datagrid id="CategoriesGrid" runat="server" Width="100%" BorderStyle="None" DataKeyField="CategoryID"
													OnUpdateCommand="CategoriesGrid_OnUpdate" OnCancelCommand="CategoriesGrid_OnCancel" OnDeleteCommand="CategoriesGrid_OnDelete"
													OnEditCommand="CategoriesGrid_OnEdit" CellPadding="2" AutoGenerateColumns="False" Font-Name="Verdana"
													AllowSorting="True" BorderColor="White" font-names="Verdana">
													<HeaderStyle Font-Bold="True" CssClass="grid-header"></HeaderStyle>
													<Columns>
														<asp:TemplateColumn SortExpression="Name" HeaderText="名称">
															<HeaderStyle HorizontalAlign="Left" CssClass="grid-header" VerticalAlign="Middle"></HeaderStyle>
															<ItemStyle CssClass="grid-first-item"></ItemStyle>
															<ItemTemplate>
																&nbsp;<%# DataBinder.Eval(Container, "DataItem.Name") %>
															</ItemTemplate>
															<EditItemTemplate>
																<asp:textbox id=EditName Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>' CssClass="Standard-text" MaxLength="50" AutoPostBack="false" Runat="server">
																</asp:textbox>
																<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="必须填写目录名称" ControlToValidate="EditName"
																	Display="Dynamic"></asp:RequiredFieldValidator>
															</EditItemTemplate>
														</asp:TemplateColumn>
														<asp:TemplateColumn SortExpression="Abbrev" HeaderText="缩写.">
															<HeaderStyle HorizontalAlign="Left" Width="70px" CssClass="grid-header" VerticalAlign="Middle"></HeaderStyle>
															<ItemStyle CssClass="grid-item"></ItemStyle>
															<ItemTemplate>
																&nbsp;<%# DataBinder.Eval(Container, "DataItem.Abbreviation") %>
															</ItemTemplate>
															<EditItemTemplate>
																<asp:textbox id=EditAbbreviation Text='<%# DataBinder.Eval(Container, "DataItem.Abbreviation") %>' CssClass="Standard-text" width="70px" AutoPostBack="false" Runat="server">
																</asp:textbox>
																<asp:requiredfieldvalidator id="Requiredfieldvalidator5" runat="server" ErrorMessage="This is a required value."
																	ControlToValidate="EditAbbreviation" display="Dynamic"></asp:requiredfieldvalidator>
																<asp:regularexpressionvalidator id="Regularexpressionvalidator3" runat="server" ErrorMessage="Abbreviation must be between 1-4 characters long."
																	ControlToValidate="EditAbbreviation" Display="Dynamic" ValidationExpression="\S{1,4}"></asp:regularexpressionvalidator>
															</EditItemTemplate>
														</asp:TemplateColumn>
														<asp:TemplateColumn SortExpression="Duration" HeaderText="持续时间(小时)">
															<HeaderStyle Wrap="False" HorizontalAlign="Left" Width="100px" CssClass="grid-header" VerticalAlign="Middle"></HeaderStyle>
															<ItemStyle HorizontalAlign="Right" CssClass="grid-item"></ItemStyle>
															<ItemTemplate>
																&nbsp;<%# DataBinder.Eval(Container, "DataItem.EstDuration") %>
															</ItemTemplate>
															<EditItemTemplate>
																<asp:textbox id=EditDuration Text='<%# DataBinder.Eval(Container, "DataItem.EstDuration") %>' CssClass="Standard-text" width="70px" AutoPostBack="false" Runat="server">
																</asp:textbox>
																<asp:requiredfieldvalidator id="Requiredfieldvalidator2" runat="server" ErrorMessage="This is a required value."
																	ControlToValidate="EditDuration" display="Dynamic"></asp:requiredfieldvalidator>
																<asp:CompareValidator id="CompareValidator1" runat="server" ErrorMessage="Hours must be an integer value"
																	ControlToValidate="EditDuration" Display="Dynamic" Type="Integer" Operator="DataTypeCheck"></asp:CompareValidator>
															</EditItemTemplate>
														</asp:TemplateColumn>
														<asp:TemplateColumn HeaderText="修改">
															<HeaderStyle HorizontalAlign="Left" Width="50px" CssClass="grid-header" VerticalAlign="Middle"></HeaderStyle>
															<ItemStyle HorizontalAlign="Center" CssClass="grid-edit-column"></ItemStyle>
															<ItemTemplate>
																<asp:imagebutton id="EditButton" runat="server" CausesValidation="false" CommandName="Edit" ImageUrl="images/icon-pencil.gif"></asp:imagebutton><IMG src="images/spacer.gif" width="3">
																<asp:imagebutton id="CatDeleteButton" Runat="server" CausesValidation="False" CommandName="Delete"
																	ImageUrl="images/icon-delete.gif"></asp:imagebutton>
															</ItemTemplate>
															<EditItemTemplate>
																<asp:imagebutton id="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" ImageUrl="images/icon-floppy.gif"></asp:imagebutton><IMG src="images/spacer.gif" width="3">
																<asp:imagebutton id="CatCancelButton" runat="server" CausesValidation="false" CommandName="Cancel"
																	ImageUrl="images/icon-pencil-x.gif"></asp:imagebutton>
															</EditItemTemplate>
														</asp:TemplateColumn>
													</Columns>
												</asp:datagrid><asp:customvalidator id="ProjectsGridCustomValidator" runat="server" enableviewstate="False" ErrorMessage="每个项目必须有至少一个目录"
													display="Dynamic"></asp:customvalidator></td>
											<td>&nbsp;</td>
											<td>&nbsp;</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr height="10">
								<td vAlign="top">
									<table cellSpacing="0" cellPadding="0" width="100%" border="0">
										<tr>
											<td>
												<hr>
											</td>
										</tr>
										<tr>
											<td align="right"><asp:button id="SaveButton2" runat="server" width="53px" CssClass="standard-text" Text="保存"></asp:button>&nbsp;&nbsp;
												<asp:button id="CancelButton2" runat="server" width="53" CssClass="standard-text" Text="取消"
													causesvalidation="False"></asp:button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
												<asp:button id="DeleteButton2" runat="server" CssClass="standard-text" Text="删除" causesvalidation="False"
													Width="49px"></asp:button></td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
					<td width="11"><IMG height="11" src="images/spacer.gif" width="11"></td>
				</tr>
			</table>
		</form>
	</body>
</HTML>
