<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Select_UserSingle_ByRole.aspx.cs" Inherits="MYAPP.Manage.SelectItem.Select_UserSingle_ByRole" %>
<%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/CSS/main.css" rel="stylesheet" type="text/css" />
<link href="splitterStyle.css" type="text/css" rel="stylesheet" />
<link href="treeStyle.css" type="text/css" rel="stylesheet" />
<title>人员选择</title>
<script language="JavaScript" type="text/javascript">
      var oMyObject =window.dialogArguments;

      function nodeCheck(sender,eventArgs)
	  {
	  
	    var checkedtf=eventArgs.get_node().get_checked();
	    var nodecs =eventArgs.get_node().get_nodes();
	    TV_Tree.beginUpdate();
        for (var i = 0; i < nodecs.get_length(); i++)
        {
         if (nodecs.getNode(i).get_value()!='-1')
          {
            nodecs.getNode(i).set_checked(checkedtf); 
            //alert(nodecs.getNode(i).get_text());
          }
          else
          {
            nodecs.getNode(i).set_checked(checkedtf); 
            nodeCheckNode(nodecs.getNode(i),checkedtf);
          }
        }
        TV_Tree.endUpdate();
	  }
	  
	  function nodeCheckNode(node,checkedtf)
	  {
	    var nodecs =node.get_nodes();
	    
        for (var i = 0; i < nodecs.get_length(); i++)
        {
         if (nodecs.getNode(i).get_value()!='-1')
          {
            nodecs.getNode(i).set_checked(checkedtf); 
          }
          else
          {
            nodecs.getNode(i).set_checked(checkedtf); 
            nodeCheckNode(nodecs.getNode(i),checkedtf);
          }
        }
        
	  }
</script>
</head>
<base target="_self"/>
<body STYLE="OVERFLOW:SCROLL;OVERFLOW-X:HIDDEN;OVERFLOW-Y:HIDDEN">
<form id="theform" runat="server">
  <table width="100%" height="100%" border="1" align="center" cellpadding="0" cellspacing="6" bordercolor="#CCCCCC"
            class="board_kong">
    <tr>
      <td valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="1">
          <tr>
            <td style="border-bottom: #CCCCCC 1px solid; height: 24px"><table class="title_table">
                <tr>
                  <td align="left"> [人员选择] </td>
                  <td width="60" align="center"><asp:Button ID="ButPost" Text=" 确  定 " runat="server" OnClick="ButPost_Click" /></td>
                  <td width="60" align="center"><input type="button" name="Button" value=" 取 消 " onClick="window.close();"></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td valign="top">
                    <ComponentArt:TreeView ID="TV_Tree" Height="100%" Width="100%" EnableViewState="true"
                                KeyboardEnabled="false" ShowLines="true" DisplayMargin="false"
                                NodeCssClass="TreeNode" SelectedNodeCssClass="SelectedTreeNode"
                                MultipleSelectedNodeCssClass="MultipleSelectedTreeNode" HoverNodeCssClass="HoverTreeNode"
                                NodeEditCssClass="NodeEdit" CutNodeCssClass="CutTreeNode" MarginWidth="20" DefaultMarginImageWidth="24"
                                DefaultMarginImageHeight="20" LineImageWidth="19" LineImageHeight="20" 
                                NodeLabelPadding="3" ParentNodeImageUrl="folders.gif"
                                LeafNodeImageUrl="folder.gif" CollapseImageUrl="exp.gif" ExpandImageUrl="col.gif"
                                ExpandCollapseImageWidth="19" ExpandCollapseImageHeight="20" ImagesBaseUrl="images/tree/"
                                LineImagesFolderUrl="images/lines/" runat="server" MultipleSelectEnabled="False"> </ComponentArt:TreeView>
			</td>
          </tr>
        </table></td>
    </tr>
  </table>
    <script language="JavaScript" type="text/javascript">
	  TV_Tree.add_nodeCheckChange(nodeCheck);
    </script>
</form>
</body>
</html>
