@model string
<div class="main no-padding no-border">
    <table border=0 cellpadding=0 cellspacing=0 class="table table-bordered form-inline form-group-sm" id="tbList" data-source="@Html.GetCanAdminMemberGroupListJson()">
        <thead>
            <tr>
                <td style="width:45px">选择</td>
                <td align="center">菜单</td>
            </tr>
        </thead>
        <tr class="item list-template-item" id='tr_{id}'>
            <td align="center"><input type="radio" id="id" name="id" value="{id}" class="theid"></td>
            <td align="center" style="text-align:left"><span>{name}</span></td>
        </tr>
    </table>
    <table border=0 cellpadding=0 cellspacing=0 class="tb-footer form-inline form-group-sm">
        <tr>
            <td>
                <form class=" form-group-sm form ui-validForm" method="post">
                    <input type="hidden" name="setValue" id="setValue" value="0" />
                    <input type="hidden" name="setField" id="setField" value="memberGroupId" />
                    <input type="hidden" name="ids" id="ids" value="" />
                    <button type="button" class="btn btn-sm  btn-primary ui-pagePost" data-custom-params="url:'@Url.ActionUrl("MemberGroupSet")',beforeExecute:'BeforeExecuting',callBack:'PostCloseRefreshBack'">设置</button>
                    <button type="button" class="btn btn-sm btn-default ui-closeDialog">关闭</button>
                </form>
            </td>
        </tr>
    </table>
    <div class="footerarea">
        提示：请选择要转移的目标分类！
    </div>
</div>
<script type="text/javascript">

    function LoadData()
    {
        $("#tbList").ListBind({showFooter:false,dataSourceFrom:"attr"});
    }
    LoadData();

    function BeforeExecuting() {
        var id = $(".theid").GetChecked();
        if (id == "") {
            Alert("请选择要设置的会员组!")
            return false;
        }
        $("#setValue").val(id);
        var $parentObj = parent.$(".checked-item");
        var ids = $parentObj.GetValue();
        $("#ids").val(ids);
        return true;
    }

</script>

