var url = CMS_SystemConfig.VirtualDirectoryPath + "/ClubCourse/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //刷新 function reload() { $("#dgClubCourseList").cmsXDataTable("load", $.getDataGridParams("dgClubCourseList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgClubCourseList").cmsXDataTable("getSelections"), function (index) { d.push(this.ClubCourseID); }); return d; } //批量新增 function ClubCourse_BatchAdd() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ClubCourse/BatchAdd" + "?MNU=" + mnu; $.popupTopWindow('俱乐部课程新增', redirectTo, 750, 520, reload, null); } //删除 function ClubCourse_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ClubCourse/Delete', { clubCourseIDs: d }, function (data) { if (data == "删除成功。") { $.messager.alert("系统提示", data); $("#dgClubCourseList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } //设置列颜色为红色 function SetRedColumn(index, row, value) { return " " + value + ""; } //设置相应的行颜色为红色 function SetRedGrid(rowIndex, rowData) { if (rowData.IsEnable != true) { return "color: red;"; } else { return ""; } } //Excel导出 function ClubCourse_Export() { $("#formQuery").submit(); }