var url = CMS_SystemConfig.VirtualDirectoryPath + "/SchoolYear/Edit"; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //新增 function SchoolYear_Add() { var redirectTo = url + "?MNU=" + mnu; $.popupTopWindow('学年学期新增', redirectTo, 650, 254, null, null); } function reload() { $("#dgSchoolYearList").cmsXDataTable("load", $.getDataGridParams("dgSchoolYearList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgSchoolYearList").cmsXDataTable("getSelections"), function (index) { d.push(this.SchoolYearID); }); return d; } //点击列表更新 function edit(rowindex, rowdata) { var redirectTo = url + "?schoolYearID=" + rowdata.SchoolYearID + "&MNU=" + mnu + "&isView=1"; $.popupTopWindow('学年学期信息', redirectTo, 650, 254, null, null); } //修改按钮 function SchoolYear_Update() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要修改的学年学期信息。"); return; } if (d.length > 1) { $.messager.alert("系统信息", "只能选择单个记录进行修改。"); return; } var redirectTo = url + "?schoolYearID=" + d + "&MNU=" + mnu; $.popupTopWindow('学年学期修改', redirectTo, 650, 254, null, null); } //删除 function SchoolYear_Delete() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要删除的学年学期信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的学年学期信息?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/SchoolYear/Delete', { schoolYearIDs: d }, function (data) { if (data == "删除成功!") { $.messager.alert("系统提示", data); $("#dgSchoolYearList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } function SchoolYear_Export() { $("#formQuery").submit(); } function QueryIsCurrentDropdownList(data) { reload(); }