var url = CMS_SystemConfig.VirtualDirectoryPath + "/ExaminationSubjectCollegeControl/Edit"; var mnu; //加载 $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }) //获取选中的数据 function validChoose() { var d = []; $.each($("#dgExaminationSubjectCollegeControlList").cmsXDataTable("getSelections"), function (index) { d.push(this.ExaminationSubjectCollegeControlID); }); return d; } function ExaminationSubjectCollegeControl_Add() { redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/ExaminationSubjectCollegeControl/Add" +"?MNU=" + mnu; $.popupTopWindow("专业报考限制新增", redirectTo, 800, 400, null, null); } function ExaminationSubjectCollegeControl_Update() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要修改的信息。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个记录进行修改。"); return; } redirectTo = url + "?examinationSubjectCollegeControlID=" + d + "&MNU=" + mnu; $.popupTopWindow("专业报考限制修改", redirectTo, 600, 350, null, null); } function ExaminationSubjectCollegeControl_Delete() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要删除的信息。"); return; } $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) { if (r) { $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationSubjectCollegeControl/Delete', { examinationSubjectCollegeControlIDs: d.join(',') }, function (data) { if (data == "删除成功。") { $.messager.alert("系统提示", data); $("#dgExaminationSubjectCollegeControlList").cmsXDataTable('load'); } else { $.messager.alert("系统提示", data); } }); } }); } function ExaminationSubjectCollegeControl_Export() { var d = validChoose().join(','); $("[name='SelectedID']").val(d); $("#formQuery").submit(); } function queryClass() { var jsonString = ""; var parameterString = ""; //var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#cgCollege").combogridX("getValue"); //var educationID = $("#Education").combobox("getValue"); var schoolYearID = $("#ddlYear").combobox("getValue"); var standardID = $("#ddlStandard").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 + "'})"; $("#ddlStandard").combogridX("reload", eval(jsonString)); $("#cgClassmajor").combogridX("reload", eval(jsonString)); } else { $("#ddlStandard").combogridX("reload"); $("#cgClassmajor").combogridX("reload"); } reload(); } function queryCollege(data) { //var campusID = $("#CampusDropdown").combogridX("getValue"); var collegeID = $("#cgCollege").combogridX("getValue"); var jsonString = "({'QueryParamsDatas':"; jsonString += "'CollegeDropdown|*|" + collegeID + "|@|'})"; $("#cgCollege").combogridX("reload", eval(jsonString)); $("#ddlStandard").combogridX("reload", eval(jsonString)); // if (campusID != nonSelect) { // var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})"; // $("#CollegeDropdown").combogridX("reload", eval(jsonString)); // } queryClass(); reload(); } function reload() { $("#dgExaminationSubjectCollegeControlList").cmsXDataTable("load", $.getDataGridParams("dgExaminationSubjectCollegeControlList")); } function validChoose() { var d = []; $.each($("#dgExaminationSubjectCollegeControlList").cmsXDataTable("getSelections"), function (index) { d.push(this.ExaminationSubjectCollegeControlID); }); return d; }