var url = CMS_SystemConfig.VirtualDirectoryPath + '/ClassmajorScheduleSetting/Edit'; var mnu = ""; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) function reload() { $("#dgClassmajorScheduleSettingList").cmsXDataTable("load", $.getDataGridParams("dgClassmajorScheduleSettingList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgClassmajorScheduleSettingList").cmsXDataTable("getSelections"), function (index) { d.push(this.ClassmajorID); }); return d; } //点击列表更新 function edit(rowindex, rowdata) { var redirectTo = url + "?classmajorID=" + rowdata.ClassmajorID + "&MNU=" + mnu + '&isView=1'; $.popupTopWindow('班级可排时间设置详情', redirectTo, 800, 400, null, null); } //修改按钮 function ClassmajorScheduleSetting_Update() { var d = validChoose(); if (d == "") { $.messager.alert("系统信息", "请选择您要修改的班级可排时间设置。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行修改。"); return; } var redirectTo = url + "?classmajorID=" + d + "&MNU=" + mnu; $.popupTopWindow('班级可排时间设置修改', redirectTo, 800, 400, null, null); } //删除 function ClassmajorScheduleSetting_Delete() { var d = validChoose().join(','); if (d.length == 0) { $.messager.alert("系统信息", "请选择您要重置班级的可排时间设置数据!!"); return; } $.messager.confirm("系统提示", "您确定要重置班级的可排时间设置数据?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/ClassmajorScheduleSetting/Delete', { classmajorIDs: d }, function (data) { if (data == "删除成功") { $.messager.alert("系统提示", "重置成功!"); $("#dgClassmajorScheduleSettingList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } function QueryClassmajorComboGrid() { reload(); } function QueryCollegeComboGrid() { reload(); } function QueryGrademajorComboGrid() { reload(); } function queryClass() { var jsonString = ""; var parameterString = ""; //var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#CollegeComboGrid").combogridX("getValue"); //var educationID = $("#Education").combobox("getValue"); var schoolYearID = $("#SchoolyearDictionaryDropDown").combobox("getValue"); var standardID = $("#DictionaryStandard").combogridX("getValue"); //var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue"); //if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|"; if (schoolYearID != nonSelect && schoolYearID != "") parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|"; if (standardID != nonSelect && standardID != "") parameterString += "DictionaryStandard|*|" + standardID + "|@|"; //if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#DictionaryStandard").combogridX("reload", eval(jsonString)); $("#ClassmajorComboGrid").combogridX("reload", eval(jsonString)); } else { $("#DictionaryStandard").combogridX("reload"); $("#ClassmajorComboGrid").combogridX("reload"); } reload(); }