<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Employee_Select.aspx.cs" Inherits="Component_AdvancedSearch_Employee_Select_List" %>
<%@ Register Src="~/Scripts/AWGridRuntime/UserControl/ListHeader.ascx" TagPrefix="uc1" TagName="ListHeader" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <uc1:ListHeader runat="server" ID="ListHeader" />
    <script type="text/javascript">
        var category = "";
        //搜索
        function search_grid() {
            var fg = document.getElementById("frame_grid");
            var keyword = $("#keyword").val();
            var url = "Employee_Select_Grid.aspx?category=" + category + "&keyword=" + escape(keyword);
            fg.src = url;
        }
        //加载树
        function load_tree() {
            var ft = document.getElementById("frame_tree");
            ft.src = "../../Base/Department/Department_Tree.aspx";
        }
        //选择
        function modify() {
            var fg = document.getElementById("frame_grid"); //得到grid控件所在iframe
            var cw = fg.contentWindow;
            var data = fg.aw_myData;
            var id = cw.aw_GetSelectRows(cw._ele_id); //返回一维数组

            if (id.length == 0) {
                AlertNO('请选择记录!');
                return;
            }
            parent.select_emplyoee(id);
            CloseDivWin(); //关闭窗口
        }
    </script>
</head>
<body onload="search_grid();load_tree();">
    <div class="div_frame_tree" style="width:24%;">
        <!--Tree控件所在的iframe-->
        <iframe  scrolling="auto" id="frame_tree" frameborder="0" style="width:100%;height:98%;"></iframe>
    </div>
    <div class="div_frame_grid" style="width:75%;">
        <!--工具栏-->
        <div style="height:30px;" class="list_menu_bar">
            <input type="text" class="edit_text_box" id="keyword" value=""/>
            <a href="javascript:search_grid()" plain="true" class="easyui-linkbutton" iconcls="icon-search">搜索</a>
            <a plain="true" class="easyui-linkbutton" onclick="modify()">选择</a>
            <a plain="true" class="easyui-linkbutton" onclick="DesignModuleFormat('Dialog_Employee_List')" style='<%=auth.FormatView()%>'>格式</a>
        </div>
        <!--Grid控件所在的iframe-->
        <iframe id="frame_grid" frameborder="0" style="width:100%;height:98%" scrolling="no"></iframe>
    </div>
</body>
</html>
