var url = CMS_SystemConfig.VirtualDirectoryPath + "/OptionalCoursePlan/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //新增 function OptionalCoursePlan_Add() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/OptionalCoursePlan/Add?MNU=" + mnu; $.popupTopWindow('限选计划信息', redirectTo, 800, 400, null, null); } function reload() { $("#dgOptionalCoursePlanList").cmsXDataTable("load", $.getDataGridParams("dgOptionalCoursePlanList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgOptionalCoursePlanList").cmsXDataTable("getSelections"), function (index) { d.push(this.OptionalCourseID); }); return d; } //点击列表更新 function edit(rowindex, rowdata) { var redirectTo = url + "?optionalCoursePlanID=" + rowdata.OptionalCourseID + "&MNU=" + mnu; $.popupTopWindow('限选计划信息', redirectTo, 800, 600, null, null); } //修改按钮 function OptionalCoursePlan_Update() { var d = validChoose(); if (d == "") { $.messager.alert("系统信息", "请选择您要修改的限选计划信息。"); return; } if (d.length > 1) { $.messager.alert("系统信息", "只能选择单个记录进行修改。"); return; } var redirectTo = url + "?optionalCoursePlanID=" + d + "&MNU=" + mnu; $.popupTopWindow('限选计划信息', redirectTo, 800, 600, null, null); } //删除 function OptionalCoursePlan_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统信息", "请选择您要删除的限选计划信息!!"); return; } $.messager.confirm("系统提示", "您确定要删除该限选计划信息?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/OptionalCoursePlan/Delete', { optionalCoursePlanIDs: d }, function (data) { if (data == "删除成功") { $.messager.alert("系统提示", "删除成功!"); $("#dgOptionalCoursePlanList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } function OptionalCoursePlan_Export() { $("#formQuery").submit(); } function QueryCoursematerialComboGrid(data) { reload(); } function QuerySpecialtyComboGrid(data) { reload(); } function QuerySchoolYearNumDropdownList(data) { reload(); } function QueryStarttermDropdownList(data) { reload(); } function QueryIsEnableDropdownList(data) { reload(); } function QueryIsOpenDropdownList(data) { reload(); } var url = CMS_SystemConfig.VirtualDirectoryPath + "/OptionalCoursePlan/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //新增 function OptionalCoursePlan_Add() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/OptionalCoursePlan/Add?MNU=" + mnu; $.popupTopWindow('限选计划信息', redirectTo, 800, 450, null, null); } function reload() { $("#dgOptionalCoursePlanList").cmsXDataTable("load", $.getDataGridParams("dgOptionalCoursePlanList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgOptionalCoursePlanList").cmsXDataTable("getSelections"), function (index) { d.push(this.OptionalCourseID); }); return d; } //点击列表更新 function edit(rowindex, rowdata) { var redirectTo = url + "?optionalCoursePlanID=" + rowdata.OptionalCourseID + "&MNU=" + mnu; $.popupTopWindow('限选计划信息', redirectTo, 800, 450, null, null); } //修改按钮 function OptionalCoursePlan_Update() { var d = validChoose(); if (d == "") { $.messager.alert("系统信息", "请选择您要修改的限选计划信息。"); return; } if (d.length > 1) { $.messager.alert("系统信息", "只能选择单个记录进行修改。"); return; } var redirectTo = url + "?optionalCoursePlanID=" + d + "&MNU=" + mnu; $.popupTopWindow('限选计划信息', redirectTo, 800, 450, null, null); } //删除 function OptionalCoursePlan_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统信息", "请选择您要删除限选计划信息!!"); return; } $.messager.confirm("系统提示", "您确定要删除该限选计划信息?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/OptionalCoursePlan/Delete', { optionalCoursePlanIDs: d }, function (data) { if (data == "删除成功") { $.messager.alert("系统提示", "删除成功!"); $("#dgOptionalCoursePlanList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } function OptionalCoursePlan_Export() { $("#formQuery").submit(); } function QueryCampusDropdownList(data) { $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + ""); reload(); } function QueryCollegeDropdownList(data) { reload(); } function QuerySchoolyearDictionaryList(data) { reload(); } function QuerySchoolyearDropdownList(data) { reload(); } function QueryComboGridList(data) { reload(); } function QueryHandleModeDictionaryDropDown(data) { reload(); }