12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/MinorSpecialtyCourse/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function reload() {
- $("#dgMinorSpecialtyCourseList").cmsXDataTable("load", $.getDataGridParams("dgMinorSpecialtyCourseList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgMinorSpecialtyCourseList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.MinorCourseID);
- });
- return d;
- }
- //新增
- function MinorSpecialtyCourse_Add() {
- var d = validChoose();
- if (d.length == 1) {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/MinorSpecialtyCourse/CopyAdd?sourceMinorCourseID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('辅修课程信息复制新增', redirectTo, 800, 600, null, null);
- }
- else {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('辅修课程信息新增', redirectTo, 800, 600, null, null);
- }
- }
- //点击列表更新
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?MinorCourseID=" + rowdata.MinorCourseID + "&MNU=" + mnu + '&isView=1';
- $.popupTopWindow('辅修课程信息详情', redirectTo, 800, 600, null, null);
- }
- //修改按钮
- function MinorSpecialtyCourse_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要修改的辅修课程信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统信息", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?MinorCourseID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('辅修课程信息修改', redirectTo, 800, 600, null, null);
- }
- //删除
- function MinorSpecialtyCourse_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统信息", "请选择您要删除辅修课程信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除该辅修课程信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/MinorSpecialtyCourse/Delete', { MinorCourseIDs: d }, function (data) {
- if (data == "删除成功") {
- $.messager.alert("系统提示", "删除成功。");
- $("#dgMinorSpecialtyCourseList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function MinorSpecialtyCourse_Export() {
- var d = validChoose().join(',')
- if (d != "") {
- document.getElementById("MinorCourseID").value = d;
- }
- else {
- document.getElementById("MinorCourseID").value = "";
- }
- $("#formQuery").submit();
- }
- //导入
- function MinorSpecialtyCourse_Import() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/MinorSpecialtyCourse/Import?MNU=' + mnu;
- $.popupTopWindow('辅修课程信息导入', redirectTo, 400, 300, null, null);
- }
|