$(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) function reload() { $("#dgLevelSettingList").cmsXDataTable("load", $.getDataGridParams("dgLevelSettingList")); } // 获取选中的数据 function validChoose() { var d = []; $.each($("#dgLevelSettingList").cmsXDataTable("getSelections"), function (index) { d.push(this.LevelSettingID); }); return d; } function LevelSetting_Add() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/LevelSetting/Edit?MNU=" + mnu; $.popupTopWindow('增加等级设置', redirectTo, 650, 385, null, null); } function LevelSetting_Edit() { var d = validChoose(); if (d == "") { $.messager.alert("系统提示", "请选择您要修改的设置信息。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行修改。"); return; } var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/LevelSetting/Edit?LevelSettingID=" + d + "&MNU=" + mnu; $.popupTopWindow('等级设置信息', redirectTo, 650, 430, null, null); } function LevelSetting_Delete() { var records = $("#dgLevelSettingList").cmsXDataTable("getSelections"); var msg = ""; var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的信息!!"); return; } $.messager.confirm("系统提示", msg + "您确定要删除所勾选的信息?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/LevelSetting/Delete', { levelSettingIDs: d }, function (data) { if (data == "删除成功") { $.messager.alert("系统提示", "删除成功!"); $("#dgLevelSettingList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); // $.post(CMS_SystemConfig.VirtualDirectoryPath + '/NewStudent/Verification', { newStudentIDs: d }, function (data) { // if (data == "1") { // msg = "所选信息存在已分配的新生,"; // } // $.messager.confirm("系统提示", msg + "您确定要删除所选择的新生信息?", function (r) { // if (r) { // $.post(CMS_SystemConfig.VirtualDirectoryPath + '/NewStudent/Delete', { newStudentIDs: d }, function (data) { // if (data == "删除成功") { // $.messager.alert("系统提示", "删除成功!"); // $("#dgLevelSettingList").cmsXDataTable('load'); // } else { // $.messager.alert("系统提示", data); // } // }); // } // }); // }); }