var mnu = ""; var editPageUrl = "/ClassroomExcessiveUse/Edit"; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); editPageUrl = CMS_SystemConfig.VirtualDirectoryPath + editPageUrl; }) function queryClassroom(data) { if (((data.length && data.length > 0) || data) && $("#cbgClassroom").length > 0 && $.data($("#cbgClassroom")[0], "combogridX")) { var buildingID = $("#cbgBuilding").combogridX("getValue"); if (buildingID != nonSelect) { var jsonString = "({'QueryParamsDatas':'BuildingsDropdown|*|" + buildingID + "|@|'})"; $("#cbgClassroom").combogridX("reload", eval(jsonString)); } } } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgClassroomExecessiveUse").cmsXDataTable("getSelections"), function (index) { d.push(this.ClassroomExcessiveUseID); }); return d; } function reload() { $("#dgClassroomExecessiveUse").cmsXDataTable("load", $.getDataGridParams("dgClassroomExecessiveUse")); } function ClassroomExcessiveUse_Add() { $.popupTopWindow('新增课外教室使用登记', editPageUrl + "?MNU=" + mnu, 600, 500, reload); } function ClassroomExcessiveUse_Edit() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要修改的信息。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行修改。"); return; } $.popupTopWindow('修改课外教室使用登记', editPageUrl + "?MNU=" + mnu + "&classroomExecessiveUseID=" + d[0], 600, 500, reload); } function ClassroomExcessiveUse_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ClassroomExcessiveUse/Delete', { classroomExcessiveUseIDs: d }, function (data) { if (data.IsSuccess) { $.messager.alert("系统提示", data.Message); $("#dgClassroomExecessiveUse").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data.Message); } }); } }); } function ClassroomExcessiveUse_Export() { $("#formQuery").submit(); }