<%@ page language="C#" autoeventwireup="true" inherits="Authority_UserGroupLFRM, App_Web_25sgrbhm" theme="Themes" stylesheettheme="Themes" %>

<!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 id="Head1" runat="server">
    <title>用户组列表</title>
                        <script src="../js/artDialog3/artDialog.min.js"></script>
      <script>          (function($) { var d = $.dialog.defaults; d.skin = ['chrome']; })(art);</script>
        <script type="text/javascript" src="../js/jquery.js"></script>
    <script language="javascript">
function CheckAll()
{
	//点击全部选择，选取本页面全部记录
	//因为在Form1中找不到chkSel的CheckBox,所以只好遍历整个document
	var cked=false;
	cked = document.getElementById("chkSelAll").checked;
	for(var i=0;i<document.getElementsByTagName("*").length;i++)
	{
		var e = document.getElementsByTagName("*")[i];
		try
		{//因为有些document的元素没有name属性，所以加上异常处理。
		//alert(e.name.substring(e.name.length-6,e.name.length));
			if(e.name.substring(e.name.length-6,e.name.length)=="chkSel")
			{
				e.checked = cked;
			}
		}
		catch(exception)
		{
		}
	}
}
function CheckSelect(mess1, mess2) {
    var count = 0;
    for (var i = 0; i < document.getElementsByTagName("*").length; i++) {
        var e = document.getElementsByTagName("*")[i];
        try {
            if (e.name.substring(e.name.length - 6, e.name.length) == "chkSel") {
                if (e.checked == true) {
                    count++;
                }
            }
        }
        catch (exception) {
        }
    }
    if (count == 0) {
        alert(mess1);
        return false;
    }
    else {
        return confirm(mess2);
    }
}
function   Check(obj)   
{ 
      var   k   =   window.event.keyCode;  
      //alert(k); 
      if(k==13){event.keyCode=9
      return;
      }
    if   ((k   <   48   ||   k   >   57)&&(k!=46&&k!=38&&k!=40)){
           
            window.event.keyCode   =   0   ;
            event.keyCode=9;
            //obj.value = '';
            obj.focus();   
}
}   
</script>
</head>
<body>
<div id="loading">
        <div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background-color: #ffffff;
            z-index: 10; filter: alpha(opacity=90); opacity: 0.9;">
        </div>
        <div id="msg_area" style="z-index: 200; left: 289px; position: absolute; top: 202px;">
            <div id="msgPanel" style="z-index: 200;" height="24px" width="100px" bordercolor="#eeeeee"
                borderstyle="Solid" borderwidth="1px">
                <asp:Image ID="img" runat="server" ImageUrl="~/images/loading.gif" />
                <font style="font-size: 9pt;color:Gray;">loading...读取中......</font>
            </div>
        </div>
    </div>
    <form id="form1" runat="server">
    <table cellpadding="0" cellspacing="0" class="table_box">
        <tr>
            <td class="right_bg">
                <span class="right_title">
                    <img src="../Images/homen.gif" class="img_style" />
                    您的当前位置： 用户及权限管理 > 权限管理 > 用户组管理</span>
            </td>
        </tr>
        <tr>
            <td class="r_top_box">
                <table cellspacing="0" cellpadding="5" class="r_top_title_box">
            <tr>
                <td style="width:300px">
                    &nbsp;</td>
                <td colspan="4" class="btn_position" style="width:70%;" align="right">
                    <asp:Button ID="btnAdd" runat="server" Text="增加用户组" OnClick="btnAdd_Click" />
                    <asp:Button ID="btnDel" runat="server" Text="删除用户组" OnClick="btnDel_Click" />
                </td>
            </tr>
        </table>
            </td>
        </tr>
        <tr>
            <td class="margintop5">
        <asp:GridView ID="gvUserGroup" DataKeyNames="id" runat="server" AutoGenerateColumns="False" OnRowCancelingEdit="gvUserGroup_RowCancelingEdit" OnRowEditing="gvUserGroup_RowEditing" OnRowUpdating="gvUserGroup_RowUpdating">
            <Columns>
            <asp:TemplateField>
                  <HeaderTemplate>
                      全选<input id="chkSelAll" name="chkSelAll" onclick="javascript:CheckAll();" type="checkbox">
                  </HeaderTemplate>
                  <HeaderStyle Width="50px" />
                  <ItemTemplate>
                      <asp:CheckBox ID="chkSel" runat="server"/>
                  </ItemTemplate>
              </asp:TemplateField>
                <asp:TemplateField HeaderText="中文名">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtCName"   runat="server" Text='<%# Bind("cname") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("cname") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="英文名">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtEName" runat="server" Text='<%# Bind("ename") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("ename") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="是否有效">
                    <EditItemTemplate>
                        <asp:CheckBox ID="cboxIsActive" runat="server" Checked='<%# Bind("Isactive") %>' />
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("Isactive") %>' Enabled="false" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="备注">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtRemark" runat="server" Text='<%# Bind("remark") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("remark") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" />
            </Columns>
            <EmptyDataTemplate>
                没有数据......
            </EmptyDataTemplate>
        </asp:GridView>
           </td></tr></table>
    
    </form>
     <script type="text/javascript">
         $("#loading").fadeOut()
</script>
</body>
</html>
