123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- var mnu = "";
- var atype = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- atype = $.SystemGeneral.getUrlParam("aType");
- })
- function reload() {
- $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this);
- });
- return d;
- }
- function validChooseStudentID() {
- var d = [];
- $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.UserID);
- });
- return d;
- }
- //弹出添加学生页面
- function FinalExamination_SettingsAdd() {
- var finalExamination = document.getElementById("FinalExaminationID").value;
- $.popupTopWindow('添加学生', CMS_SystemConfig.VirtualDirectoryPath + '/FinalExamination/StudentAdd?finalExamination=' + finalExamination + '&MNU=' +
- mnu, 650, 300, reload);
- }
- //修改学生
- function FinalExamination_SettingsEdit() {
- var d = validChooseStudentID();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择要修改的学生。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var finalExamination = document.getElementById("FinalExaminationID").value;
- $.popupTopWindow('修改学生', CMS_SystemConfig.VirtualDirectoryPath + '/FinalExamination/StudentAdd?finalExamination=' + finalExamination + '&UserID=' + d + '&MNU=' +
- mnu, 650, 300, reload);
- }
- //删除学生
- function FinalExamination_SettingsDelete() {
- var d = validChooseStudentID().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择你要删除的信息!");
- return;
- }
- var finalExamination = document.getElementById("FinalExaminationID").value;
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/FinalExamination/StudentDelete', { finalExaminationID: finalExamination, UserIDs: d }, function (data) {
- if (data == "删除成功!") {
- $.messager.alert("系统提示", data);
- //刷新学生名单列表
- $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
|