123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/CourseTimeHours/Edit";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function reload() {
- $("#dgList").cmsXDataTable("load", $.getDataGridParams("dgList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.CourseTimeHoursID);
- });
- return d;
- }
-
- //新增
- function CourseTimeHours_Add() {
-
- var redirectTo = url + '?MNU=' + mnu;
- $.popupTopWindow('学时转换设置新增', redirectTo, 800, 200, null, null);
- }
- //点击列表更新
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?CoursesTimeID=" + rowdata.CourseTimeHoursID + "&MNU=" + mnu + '&isView=1';
- $.popupTopWindow('学时转换设置详情', redirectTo, 800, 200, null, null);
- }
- //修改按钮
- function CourseTimeHours_Update() {
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统信息", "请选择您要修改的学时转换设置。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?CoursesTimeID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('学时转换设置修改', redirectTo, 800, 200, null, null);
- }
- //删除
- function CourseTimeHours_Delete() {
- var d = validChoose().join(',');
- if (d.length == 0) {
- $.messager.alert("系统信息", "请选择您要删除学时转换设置数据!!");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除的学时转换设置数据?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/CourseTimeHours/Delete', { ids: d }, function (data) {
- if (data == "删除成功") {
- $.messager.alert("系统提示", "删除成功!");
- $("#dgList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
|