@model string

<div class="main">
    <table border=0 cellpadding=0 cellspacing=0 class="tb-head form-inline form-group-sm">
        <tr>
            <td class="left">
                <div class="btn-group btn-group-sm">
                    <button type="button" class="btn btn-default btn-sm ui-selectInvert">反选</button>
                    <button type="button" class="btn btn-default btn-sm " onclick="SelectData()">确定</button>
                </div>
            </td>
            <td class="right">
                <select name="memberGroupId" id="memberGroupId"  class="form-control ui-queryString ui-selectBind" data-source="@Html.GetCanAdminMemberGroupListJson()">
                    <option value="">所有会员组</option>
                </select>
                <select name="departmentId" id="departmentId"  class="form-control ui-queryString ui-selectBind" data-source="@Html.GetDepartmentListJson()" data-custom-params="isTree:true,onlySelectFinal:true">
                    <option value="">所有部门</option>
                </select>
                <input type="text" name="username" id="username" style="width:120px;" placeholder="请输入用户名查询" class="form-control ui-queryString ui-keyword" />
                <button type="button" class="btn btn-default btn-sm ui-queryString-search">搜索</button>
            </td>
        </tr>
    </table>
    <table border=0 cellpadding=0 cellspacing=0 class="table table-bordered" id="tb_list">
        <thead>
            <tr>
                <td align="center" style="width:40px"><input type="checkbox" title="选择" class="ui-selectInvert" data-custom-params="isReverse:false"></td>
                <td align="center">用户名</td>
                <td align="center">会员组</td>
                <td align="center">部门</td>
            </tr>
        </thead>
        <tr class="item tem" id="item_{id}" username="{Username}">
            <td align="center"  style="width:40px"><input type="checkbox" value="{Id}" data-input-value="{Username}" class="checked-item"></td>
            <td align="center">{Username}</td>
            <td align="center"><span class="sp_member_group">{MemberGroupId}</span></td>
            <td align="center"><span class="sp_department">{DepartmentId}</span></td>
        </tr>
    </table>
</div>

<script type="text/javascript">
    var $memberGroupId = $("#memberGroupId");
    var $departmentId = $("#departmentId");
    $memberGroupId.SelectBind({dataSourceFrom:"attr"});
    $departmentId.SelectBind({ dataSourceFrom: "attr" });

    var objName = Request("objname");
    function LoadedInit()
    {
        SetSelectedDisabled();
        $(".sp_member_group").ConvertText({}, $memberGroupId.attr("data-source"));
        $(".sp_department").ConvertText({}, $departmentId.attr("data-source"));
    }

    function LoadData() {
        var ajaxUrl = "@Url.ActionUrl("PageListData")?_isload=1"
        $("#tb_list").ListBind({url:ajaxUrl,callBack: "LoadedInit" });
    }
    LoadData();
</script>
<script src="/Js/selectData.js" type="text/javascript"></script>
