1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/GradePointFormula/Edit";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- //新增
- function GradePointFormula_Add() {
- var redirectTo = url + "?MNU=" + mnu;
- $.popupTopWindow('学分公式设置新增', redirectTo, 920, 150, null, null);
- }
- function reload() {
- $("#dgGradePointFormulaList").cmsXDataTable("load", $.getDataGridParams("dgGradePointFormulaList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgGradePointFormulaList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.GradePointFormulaID);
- });
- return d;
- }
- //点击列表更新
- function edit(rowindex, rowdata) {
- var redirectTo = url + "?gradePointFormulaID=" + rowdata.GradePointFormulaID + "&MNU=" + mnu + "&isView=1";
- $.popupTopWindow('绩点公式设置信息详情', redirectTo,920, 150, null, null);
- }
- //修改按钮
- function GradePointFormula_Update() {
- var d = validChoose();
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要修改的绩点公式设置。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?gradePointFormulaID=" + d + "&MNU=" + mnu;
- $.popupTopWindow('绩点公式设置信息修改', redirectTo, 920, 150, null, null);
- }
- //删除
- function GradePointFormula_Delete() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的绩点公式设置信息!!");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除该绩点公式设置信息?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/GradePointFormula/Delete', { gradePointFormulaIDs: d }, function (data) {
- if (data == "删除成功") {
- $.messager.alert("系统提示", "删除成功!");
- $("#dgGradePointFormulaList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
|