<%@ page autoeventwireup="false" inherits="WebExam.Web.dwgl, App_Web_st1xh0ee" language="vb" masterpagefile="~/Page.master" title="部门管理" %>

<%@ MasterType VirtualPath="~/Page.master" %>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentHead" EnableViewState="False">
<link rel="stylesheet" href="../../../style/divcss.css" type="text/css" />
<style type ="text/css">
li{ padding:10px}
</style>
</asp:Content>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="mainCopy">
    
<script type="text/javascript">

function join(arr){
  var t="";
  for(var i=0;i<arr.length;i++){
    t+=arr[i].toString()+",";
  }
 
  return t.substr(0,t.length -1); 
}
    
       function lifeDateChange(obj){
         var d_len=document.getElementById("<%= DDL_len.ClientID %>");
         if(obj.value=='l')
          d_len.style.display="none";
         else
          d_len.style.display="block";
       
      
       }
       function displayDate(display){
         var lifeArea=document.getElementById("<%= Panel1.ClientID %>");
         if (display ){
           lifeArea.style.display="block";
         
         }
         else
           lifeArea.style.display="none";
       }
  
    </script>

    <div class="top" style ="float:left">
        <asp:TreeView ID="departTree" runat="server" AutoGenerateDataBindings="False" EnableClientScript="true"
            EnableViewState="true" ExpandDepth="0" PopulateNodesFromClient="true" OnTreeNodePopulate="PopulateNode" >
            <SelectedNodeStyle ForeColor="#009933" Font-Bold="True"></SelectedNodeStyle>
        </asp:TreeView>
    </div>
    <asp:Panel ID="Panel2" runat="server" Visible="False">
        <div class="leftSpace top" style ="float:left">
            <ul>
                <li>
                    <div class="font_space" style="float:left">
                        部门名称
                    </div>
                    <div class="font_space" style ="float:left">
                        <asp:TextBox ID="TB_partName" runat="server" ValidationGroup="rename"></asp:TextBox><asp:Button
                            ID="Btn_save" runat="server" Text="保存" ValidationGroup="rename" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*"
                            ValidationGroup="rename" ControlToValidate="TB_partName"></asp:RequiredFieldValidator>
                        <asp:ImageButton ID="Im_top" runat="server" ImageUrl="~/images/action_top.gif" ToolTip="位置上移到顶" />
                        <asp:ImageButton ID="Im_up" runat="server" ImageUrl="~/images/action_up.gif" ToolTip="位置上移" />
                        <asp:ImageButton ID="Im_down" runat="server" ImageUrl="~/images/action_down.gif"
                            ToolTip="位置下移" />
                        <asp:ImageButton ID="Im_bottom" runat="server" ImageUrl="~/images/action_bottom.gif"
                            ToolTip="位置下移到底" />
                        <asp:LinkButton ID="LB_admList" runat="server" Visible="False">管理员</asp:LinkButton>
                    </div>
                </li>
                <li>
                    <div class="compart top" style="float:left;">
                    </div>
                </li>
                <li>
                    <div class="font_space" style="float:left;">
                        允许用户自行注册
                    </div>
                    <div class="font_space" style="float:left;">
                        <asp:CheckBox ID="CB_selfReg" runat="server" onclick="displayDate(this.checked);" />
                    </div>
                    
                        <asp:Panel ID="Panel1" runat="server"><ul>
                    <li>
                            <div class="font_space" style="float: left;">
                                自注册用户有效期</div>
                            <asp:DropDownList ID="DDL_len" runat="server" Style="float: left; display: none">
                            </asp:DropDownList>
                            <asp:DropDownList ID="DDL_lifeDate" runat="server" onchange="lifeDateChange(this);"
                                Style="float: left;">
                                <asp:ListItem Value="l" Text="长期"></asp:ListItem>
                                <asp:ListItem Value="d" Text="日"></asp:ListItem>
                                <asp:ListItem Value="m" Text="月"></asp:ListItem>
                                <asp:ListItem Value="y" Text="年"></asp:ListItem>
                            </asp:DropDownList>
                            </li>
                            <li>
                            部门别名<asp:TextBox ID="TB_Alias" runat="server"></asp:TextBox><label style="font-weight: normal; color: #FF6600">用户注册时看到的部门名称，可以隐藏真实的部门名称</label>
                            </li>
                    </ul>
                        </asp:Panel>
                    
                </li>
                <li>
                    <div class="font_space" style ="float:left">
                        允许用户自行修改个人资料
                    </div>
                    <div class="font_space" style ="float:left">
                        <asp:CheckBox ID="CB_selfModifyProfile" runat="server" />
                    </div>
                </li>
                <li>
                    <asp:Button ID="Btn_save2" runat="server" Text="保存" />
                </li>
                <li>
                    <div class="compart top" style="float:left">
                    </div>
                </li>
                <li>
                    <div>
                        <asp:Button ID="BtnDelPart" runat="server" Text="删除当前部门" OnClientClick="return confirm('确实要删除该部门吗？')" />
                    </div>
                </li>
                <li>
                    <div class="compart top" style ="float:left">
                    </div>
                </li>
                <li>
                    <div class="font_space" style ="float:left">
                        <asp:TextBox ID="newChild" runat="server" EnableViewState="False" ValidationGroup="newChild"></asp:TextBox><asp:RequiredFieldValidator
                            ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="newChild"
                            ValidationGroup="newChild"></asp:RequiredFieldValidator>
                        <asp:Button ID="BtnAdd" runat="server" ValidationGroup="newChild" Text="添加为子部门" />
                    </div>
                </li>
            </ul>
        </div>
    </asp:Panel>
</asp:Content>
