<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RoleEditList.aspx.cs" Inherits="Chaokers.CN.SysMembership.Web.RoleEditList" %>
<%@ Register assembly="Chaokers.CN.SysMembership.Components" namespace="Chaokers.CN.SysMembership.Components.Controls" tagprefix="cc1" %>
        
<!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">
<asp:Literal runat="server">角色管理</asp:Literal>    
<script type="text/javascript" src="../Js/CheckBoxAct.js"></script>
<script type="text/javascript" src="../Js/UIOpr.js"></script>
<script type="text/javascript">   
    function del(roleID,roleName,currPage) {
        if (confirm("确定要删除角色[" + roleName + "]吗？")) {
            window.location.href = "RoleDel.aspx?RoleID=" + roleID + "&Page=" + currPage;
        }
    }
</script>  
</head>
<body>
<form id="form1" runat="server">
<div id="wrapper">    

    <cc1:CurrLocation ID="CurrLocation1" runat="server" InnerText="角色与权限/角色管理" />
    
    <div id="mainContainer"> 

    <asp:Repeater ID="rpRoles" Runat="server" EnableViewState="False"  >
    <HeaderTemplate>
    <table cellpadding="1" cellspacing="0" class="listTable" border="1" bordercolor="<% = base.AppTheme.MainBorderColor %>" style="border-collapse:collapse;">
    <thead>
    <td align="center" style="width:25px;" class="firstTd">No.<%--<input type="checkbox" name="chkAll" id="chkAll" onclick="javascript:SelectAll();" />--%></td>
    <td align="center">角色名称</td>    
    <td align="center">角色描述</td>
    <td align="center" style="width:80px;">权限设置</td>
    <td align="center" style="width:50px;">编辑</td>  
    <td align="center" style="width:50px;">删除</td>  
    </thead>
    </HeaderTemplate>
    <ItemTemplate>
    <tr class="cursor-hand" onmouseover="SetMOverState(this);" onmouseout="SetMOutState(this);">
	    <td align="center" class="firstTd"><%# (base.CurrPage -1)*base.PageSize + Container.ItemIndex + 1%><%--<input type="checkbox" name="chkBox" onclick="UnSelectAll();" value="<%# Eval("RoleID")%>">--%></td>		
	    <td align="left">&nbsp;<%# Eval("RoleName")%></td>
	    <td align="left">&nbsp;<%# Eval("RoleDesc")%></td>	 
	    <td align="center"><a href="GrantPrivileges.aspx?RoleID=<%# Eval("RoleID")%>"><% = base.AttachImage("edit.gif")%></a></td>
	    <td align="center"><a href="RoleEdit.aspx?RoleID=<%# Eval("RoleID")%>"><% = base.AttachImage("edit.gif")%></a></td>	    
        <td align="center"><a href="javascript:del(<%# Eval("RoleID")%>,'<%# Eval("RoleName")%>', <% = base.CurrPage %>);"><% = base.AttachImage("del.gif")%></a></td>	    
    </tr>
    </ItemTemplate>
    <FooterTemplate>
    </table>
    
    <div style="display:none;"><input type="hidden" name="chkNum" value="<%=chkNum%>" /></div>
    </FooterTemplate>
    </asp:Repeater>               
    <asp:Label ID="lblHidden" runat="server"></asp:Label>  
    
    <table cellpadding="0" cellspacing="0" class="pagerBar" id="pagerBar" runat="server">
    <tr>
    <td align="left">
           <asp:Label ID="lblPageInfo" runat="server" Text="当前是第{0}页共{0}页 "></asp:Label>      
           <asp:LinkButton ID="lbnFirst" runat="server" OnClick="PageChanged" CommandName="First">首页</asp:LinkButton>
           <asp:LinkButton ID="lbnPrev"  runat="server" OnClick="PageChanged" CommandName="Prev">上一页</asp:LinkButton>
           <asp:LinkButton ID="lbnNext" runat="server" OnClick="PageChanged" CommandName="Next">下一页</asp:LinkButton>
           <asp:LinkButton ID="lbnLast" runat="server" OnClick="PageChanged" CommandName="Last">末页</asp:LinkButton>
    </td>
    <td align="right">
        <em><b><a href="RoleEdit.aspx">[添加新角色]</a>
    </td>
    </tr>
    </table>
    
    </div><!--"mainContainer.END"-->

</div><!--"wrapper.END"-->
</form> 
    
</body>
</html>
