<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RoleList.aspx.cs" Inherits="admin_Rights_RoleList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>管理角色</title>
<link rel="stylesheet" href="../skin/Style.css" type="text/css" />
   <script type="text/javascript" src="../../js/jquery.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div class="itemtitle">
 管理员设置
</div>
<div class="itemtitle_tect">
<p runat="server" id="menu"><a href="RoleAdd.aspx">添加角色</a> | <a href="RoleList.aspx">角色管理</a> </p>
</div>
<div class="clr"></div>
<div class="talbe_border">
<asp:GridView ID="grvRole" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
	GridLines="None"  AllowPaging="True" OnRowDataBound="grvRole_RowDataBound" CssClass="talbe_list" cellspacing="0" CellPadding="0">
	<Columns>
		<asp:BoundField DataField="ID" HeaderText="ID">
		<HeaderStyle CssClass="tou" />
		<ItemStyle CssClass="th_left th20 nolet" />
		</asp:BoundField>
		<asp:BoundField DataField="RoleName" HeaderText="名称">
		<HeaderStyle CssClass="th_left" />
		<ItemStyle CssClass="left2 th75" />
		</asp:BoundField>
		<asp:BoundField DataField="Describe" HeaderText="描述">
		<HeaderStyle CssClass="th_left" />
		<ItemStyle CssClass="left2" />
		</asp:BoundField>
		<asp:TemplateField HeaderText="添加日期">
			<ItemTemplate>
				<asp:Label ID="Label1" runat="server" Text='<%# GetShortDate(Eval("AddDate").ToString()) %>'></asp:Label>
			</ItemTemplate>
			<HeaderStyle CssClass="th80" />
		</asp:TemplateField>
		<asp:TemplateField HeaderText="操作选项" >
			<ItemTemplate>
			<%--	<asp:HyperLink id="user" NavigateUrl="ManagerList.aspx?id=<%#Eval("ID") %>"   Text="成员管理" runat="server" ></asp:HyperLink> --%>
				  
				  <asp:Panel ID="admin" runat="server">
				  <a id="user" href="ManagerList.aspx?id=<%#Eval("ID") %>" > 成员管理</a>	
				  <a id="edit" href="RoleEdit.aspx?ID=<%#Eval("ID") %>">编辑</a>
				<asp:LinkButton ID="lbtnUpdate" Font-Underline="false" runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID")+"|"+DataBinder.Eval(Container.DataItem, "Authorize") %>'
					Text='<%# DataBinder.Eval(Container.DataItem, "Authorize").ToString()== "True" ? "禁用" : "启用"%>'
					OnCommand="lbtnUpdate_Command"></asp:LinkButton>
					
				<asp:LinkButton ID="lbtndelete" Font-Underline="false" runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>'　Text='删除' OnClientClick="return confirm('您确认要删除吗？')"  OnCommand="lbtdelete_Command"></asp:LinkButton>
				</asp:Panel>
				<asp:Panel ID="Panel1" runat="server" Visible="false">
				  <a id="A1" href="ManagerList.aspx?id=<%#Eval("ID") %>" > 成员管理</a>	
				  <span id="s" style="color:#ccc">编辑</span>
				  <span id="Span1" style="color:#ccc">禁用</span>
				  <span id="Span2" style="color:#ccc">删除</span>
				  </asp:Panel>
			</ItemTemplate>
			<HeaderStyle CssClass="th_left th180" />
		<ItemStyle CssClass="th_left" />
		</asp:TemplateField>
	<%--	<asp:CommandField ShowDeleteButton="True" />--%>
	</Columns>
	<HeaderStyle CssClass="header" />
</asp:GridView>
</div>
</form>
</body>
</html>
