<%@ Import Namespace="ASPNET.StarterKit.Portal" %>
<%@ Register TagPrefix="ASPNETPortal" TagName="Banner" Src="~/DesktopPortalBanner.ascx" %>
<%@ Page language="c#" CodeBehind="ManageUsers.aspx.cs" AutoEventWireup="false" Inherits="ASPNET.StarterKit.Portal.ManageUsers" %>
<HTML>
	<HEAD>
		<%--
    The SecurityRoles.aspx page is used to create and edit security roles within
    the Portal application.
--%>
		<link rel="stylesheet" href='<%= Global.GetApplicationPath(Request) + "/ASPNETPortal.css" %>' type="text/css">
	</HEAD>
	<body leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0">
		<form runat="server">
			<table width="100%" cellspacing="0" cellpadding="0" border="0">
				<tr valign="top">
					<td colspan="2">
						<ASPNETPortal:Banner ShowTabs="false" runat="server" id="Banner1" />
					</td>
				</tr>
				<tr>
					<td width="100">
						&nbsp;
					</td>
					<td>
						<br>
						<table width="450" cellspacing="0" cellpadding="4" border="0">
							<tr height="*" valign="top">
								<td colspan="2">
									<table width="100%" cellspacing="0" cellpadding="0">
										<tr>
											<td align="left">
												<span id="title" class="Head" runat="server"> 管理用户</span>&nbsp;
											</td>
										</tr>
										<tr>
											<td>
												<hr noshade size="1">
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td class="Normal">
									电子邮件（或者Windows域名）：
								</td>
								<td>
									<asp:Textbox id="Email" width="200" cssclass="NormalTextBox" runat="server" />
								</td>
							</tr>
							<tr>
								<td class="Normal">
									口令：&nbsp;
								</td>
								<td>
									<asp:Textbox id="Password" width="200" cssclass="NormalTextBox" runat="server" TextMode="Password" />
									<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="Password"
										CssClass="NormalRed" Display="Dynamic"></asp:RequiredFieldValidator>
								</td>
							</tr>
							<tr>
								<td class="Normal">
									确认口令：&nbsp;
								</td>
								<td>
									<asp:Textbox id="ConfirmPassword" width="200" cssclass="NormalTextBox" runat="server" TextMode="Password" />
									<asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="ConfirmPassword"
										CssClass="NormalRed" Display="Dynamic"></asp:RequiredFieldValidator>
									<asp:CompareValidator id="CompareValidator1" runat="server" ErrorMessage="*" ControlToValidate="ConfirmPassword"
										ControlToCompare="Password" CssClass="NormalRed" Display="Dynamic"></asp:CompareValidator>
								</td>
							</tr>
							<tr>
								<td colspan="3">
									<asp:LinkButton Text="Apply Name and Password Changes" cssclass="CommandButton" runat="server" ID="UpdateUserBtn">
									提交名字与口令的更改</asp:LinkButton>
									<br>
									<br>
								</td>
							</tr>
							<tr>
								<td colspan="2">
									<asp:DropDownList id="allRoles" DataTextField="RoleName" DataValueField="RoleID" runat="server" />
									&nbsp;<asp:LinkButton id="addExisting" cssclass="CommandButton" Text="添加用户至此角色" runat="server" CausesValidation="False">
								添加用户至此角色</asp:LinkButton>
								</td>
							</tr>
							<tr valign="top">
								<td>
									&nbsp;
								</td>
								<td>
									<asp:DataList id="userRoles" RepeatColumns="2" DataKeyField="RoleId" runat="server">
										<ItemStyle Width="225px"></ItemStyle>
										<ItemTemplate>
											&nbsp;&nbsp;
											<asp:ImageButton id="Imagebutton1" runat="server" ImageUrl="~/images/delete.gif" CommandName="delete"
												AlternateText="从角色中删除用户"></asp:ImageButton>
											<asp:Label id=Label1 runat="server" cssclass="Normal" Text='<%# DataBinder.Eval(Container.DataItem, "RoleName") %>'>
											</asp:Label>
										</ItemTemplate>
									</asp:DataList>
								</td>
							</tr>
							<tr>
								<td colspan="2">
									<hr noshade size="1">
								</td>
							</tr>
							<tr>
								<td colspan="2">
									<asp:LinkButton id="saveBtn" class="CommandButton" Text="保存对用户的修改" runat="server" CausesValidation="False">
								保存对用户的修改</asp:LinkButton>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</body>
</HTML>
