<%@ Import Namespace="ASPNET.StarterKit.Portal" %>
<%@ Register TagPrefix="ASPNETPortal" TagName="Banner" Src="~/DesktopPortalBanner.ascx" %>
<%@ Page language="c#" CodeBehind="SecurityRoles.aspx.cs" AutoEventWireup="false" Inherits="ASPNET.StarterKit.Portal.SecurityRoles" %>
<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>
						<br>
						<table width="98%" cellspacing="0" cellpadding="4" border="0">
							<tr height="*" valign="top">
								<td width="100">
									&nbsp;
								</td>
								<td width="*">
									<table width="450" cellpadding="2" cellspacing="4" border="0">
										<tr>
											<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>
												<asp:Label id="Message" CssClass="NormalRed" runat="server" />
											</td>
										</tr>
										<tr>
											<td>
												&nbsp;
											</td>
											<td>
												<table width="100%" cellspacing="0" cellpadding="0">
													<tr>
														<td>
															<asp:TextBox id="windowsUserName" Text="DOMAIN\username" Visible="False" runat="server" />
														</td>
														<td class="Normal">
															<asp:LinkButton id="addNew" cssclass="CommandButton" Text="Create new user and add to role" Visible="False"
																runat="server">
                                                        创建新用户并加入角色</asp:LinkButton>
														</td>
													</tr>
													<tr>
														<td>
															<asp:DropDownList id="allUsers" DataTextField="Email" DataValueField="UserID" runat="server" />
														</td>
														<td>
															<asp:LinkButton id="addExisting" cssclass="CommandButton" Text="Add existing user to role" runat="server">
                                                        添加已有用户至角色</asp:LinkButton>
														</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr valign="top">
											<td>
												&nbsp;
											</td>
											<td>
												<asp:DataList id="usersInRole" RepeatColumns="2" DataKeyField="UserId" runat="server">
													<ItemStyle Width="225px"></ItemStyle>
													<ItemTemplate>
														&nbsp;&nbsp;
														<asp:ImageButton id="ImageButton1" runat="server" AlternateText="从角色中删除该用户" CommandName="delete"
															ImageUrl="~/images/delete.gif"></asp:ImageButton>
														<asp:Label id=Label1 runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Email") %>' cssclass="Normal">
														</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="Save Role Changes" runat="server">
                                            保存角色修改</asp:LinkButton>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</body>
</HTML>
