<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Title="设置部门成员"
 CodeBehind="DepartmentMembers.aspx.cs" Inherits="PowerEasy.Module.General.WebSite.Admin.User.DepartmentMembersUI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CphNavigation" runat="server">
    <pe:ExtendedSiteMapPath ID="SmpNavigator" SiteMapProvider="AdminMapProvider" runat="server"/>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CphContent" runat="server">
<style>
/*搜索*/
.Admin_Search
{
    margin-top:3px;
    margin-bottom:0px;
}
.Admin_Searchb, .Admin_Searcha
{
    background-image: url(../../Admin/Images/SearchN.gif);
    background-repeat: no-repeat;
    cursor: pointer;
    width: 15px;
    height: 15px;
    z-index: 9999;
    position:absolute;
    margin-left:-22px;
    margin-top:3px;
}
.Admin_Searcha
{
    background-image: url(../../Admin/Images/SearchX.gif);
}
.Admin_Search_UpAndDown
{
    display:none;
}
</style>
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <table width="100%" border="0" cellpadding="3" cellspacing="1" class="border">
        <tr align="center">
            <td colspan="2" class="spacingtitle">
                <asp:Label ID="LabTitle" runat="server" Font-Bold="true"></asp:Label>
            </td>
        </tr>
        <tr class="tdbg" style="height:50px;">
            <td class="tdbgleft" align="right" style=" width:20%;">
                <strong>部门名称：</strong>
            </td>
            <td style="font-size:18px;">
                <strong><asp:Literal ID="LblDepartmentName" runat="server"/></strong>
            </td>
        </tr>
        <tr class="tdbg">
            <td align="center" colspan="2">
                <br />
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                 <ContentTemplate>             
                        <table border="0" cellspacing="0" cellpadding="0">
                            <tr align="left">
                                <td valign="top">
                                    <strong>以下管理员为不属于该部门成员：</strong><br />
                                    <asp:DropDownList ID="DropRole" DataTextField="RoleName" DataValueField="RoleId" Width="250px"
                                        runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropRole_SelectedIndexChanged">
                                    </asp:DropDownList><br />
                                    <div class="Admin_Search">
                                    <input ID="Admin_Search" value="快速搜索" class="inputtext"  style="width:246px;"/>
                                    <a id="Searchb" class="Admin_Searchb" ></a>
                                    </div> 
                                    <asp:ListBox ID="LstNotBelongDepartment" runat="server" Height="239px" Width="250px"
                                        SelectionMode="Multiple"></asp:ListBox>&nbsp;
                                </td>
                                <td style="width: 100px;" align="center">
                                    <span id="Admin_Search_UpAndDown" class="Admin_Search_UpAndDown"><input id="Button4" value="上一个" type="button" class="inputbutton" style="width:68px;" onclick="searchpre()"/><br /><br /><input id="Button3" value="下一个" type="button" class="inputbutton" style="width:68px;" onclick="searchnext()"/></span><br /><br /><asp:Button ID="BtnAdd" CssClass="inputbutton" runat="server" Text="添加>>" Width="68px" OnClick="BtnAdd_Click" /><br /><br /><asp:Button ID="BtnRemove" CssClass="inputbutton" runat="server" Text="<<移除" Width="68px" OnClick="BtnRemove_Click" />
                                </td>
                                <td align="left" valign="top">
                                    <strong>以下管理员为属于该部门成员：</strong><br />
                                    <asp:ListBox ID="LstBelongToDepartment" runat="server" Height="280px" Width="250px"
                                        DataTextField="AdminName" DataValueField="AdminId" SelectionMode="Multiple">
                                    </asp:ListBox>
                                    <asp:HiddenField ID="HdnBelongToDepartment" runat="server" />
                                </td>
                            </tr>
                        </table>
                 </ContentTemplate>
                 <Triggers>
                  <asp:AsyncPostBackTrigger ControlID="BtnAdd" EventName="Click" />
                  <asp:AsyncPostBackTrigger ControlID="BtnRemove" EventName="Click" />
                  <asp:AsyncPostBackTrigger ControlID="DropRole" EventName="SelectedIndexChanged" />
                 </Triggers>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr class="tdbgbottom">
         <td colspan="2">
             <asp:Button ID="Button1" runat="server" Text="保存" CommandName="operation" OnClick="SaveManagers"/>
             <asp:Button ID="Button2" runat="server" Text="返回" CommandName="return" OnClick="SaveManagers"/>
         </td>
        </tr>
    </table>
    <div id="prompt-note">
        <dl>
            <dt class="prompt-note-tit"><span>提示说明</span> </dt>
            <dd class="prompt-note-con">
                <ul>
                    <li>具有指定部门的某些管理权限：当管理员所属角色具有此权限并且属于某部门成员，则该管理员具有所属部门的管理权限。</li>
                    <li>具有所有部门的某些管理权限：当管理员所属角色具有此权限时，则该管理员不必属于某部门成员也拥有所有部门的管理权限。</li>
                </ul>
            </dd>
        </dl>
    </div>
</asp:Content>
