<%@ Page Language="C#" AutoEventWireup="true" Inherits="WstWeb.Admin.Admin.admin_AdminManagement_Role_edit" Codebehind="Role_edit.aspx.cs" %>

<!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>
   <title>角色编辑</title>
    <link href="../CSS/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/publicComm.js"></script>
</head>
<body>
    <form id="form1" runat="server">
 <div class="ctright">
  <div class="formclum"></div>
  <div class="form">
<table class="table1" width="100%" border="1" cellspacing="0" cellpadding="0">
  <tbody>
          <tr>
            <td width="100" bgcolor="f1f7fc" ><span class="mag"><span class="red">*</span>角色名称：</span></td>
            <td align="left">
                <asp:TextBox ID="txt_roleName" runat="server"></asp:TextBox>
            </td>
          </tr>
          <tr>
            <td width="100" bgcolor="f1f7fc" ><span class="mag"><span class="red">*</span>权限组：</span></td>
            <td align="left">
                <asp:Literal ID="lit_SpqhData" runat="server"></asp:Literal>
            </td>
          </tr>
          <tr>
            <td height="25" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td bgcolor="#FFFFFF">
            <input type="button" value="全选/反选" onclick="CheckAlls()" />
                <asp:Button ID="Button1" runat="server" Text="" onclick="Button1_Click" CssClass="button3" OnClientClick="return CheckBox()" />
                <asp:Button ID="Button2" runat="server" Text="" onclick="Button2_Click"  CssClass="button4" />
         
            </td>
          </tr>
        </table>
	</div>
    </div>
    <input type="hidden" id="hdn_purviewCodes" runat="server" />
    <script type="text/javascript">
        function CheckAlls() {
            var a = document.getElementsByTagName("input");
            for (var i = 0; i < a.length; i++) {
                if (a[i].type == "checkbox") {
                    if (a[i].checked == true) {
                        a[i].checked = false;
                    }
                    else {
                        a[i].checked = true;
                    }
                }
            }
        }
    function CheckBox()
    {
       document.getElementById("hdn_purviewCodes").value=GetCheckBoxCheckedValue("chk_Code");
       if(document.getElementById("hdn_purviewCodes").value=="")
       {
         alert("请为该角色设定权限值");
         return false;
       }
       return true;
    }
  </script>
    </form>
</body>
</html>

