var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) function SOCDetailGroup_Add() { var SOCDetailID = $("#SOCDetailID").val(); var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOCDetailGroup/AddGroup?SOCDetailID=" + SOCDetailID + "&MNU=" + mnu; $.popupTopWindow('新建分组', redirectTo, 700, 500, reload); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgSOCDetailGroupList").cmsXDataTable("getSelections"), function (index) { d.push(this.SOCDetailGroupID); }); return d; } function SOCDetailGroup_StudentEdit() { var d = validChoose(); if (d == "") { $.messager.alert("系统提示", "请选择您要修改学生的信息。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录。"); return; } var redirectTo = "/SOCDetailGroup/StudentEdit?SOCDetailGroupID=" + d + "&MNU=" + mnu; $.popupTopWindow('学生名单', redirectTo, 850, 480, reload); } function SOCDetailGroup_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SOCDetailGroup/SOCDetailGroupDelete', { SOCDetailGroupIDs: d }, function (data) { if (data == "删除成功!") { $.messager.alert("系统提示", data); $("#dgSOCDetailGroupList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } function reload() { $("#dgSOCDetailGroupList").cmsXDataTable("load", $.getDataGridParams("dgSOCDetailGroupList")); } function SOCDetailGroupGroup_Export() { $("#formQuery").submit(); }