var isFirstLoadCollege = true; function QueryCollegeDropdownList(data) { if (((data.length && data.length > 0) || data)) { if (isFirstLoadCollege) { isFirstLoadCollege = false; } else { if (data.length > 0) { $("#CollegeDropdown").combobox("setValue", data[0].Value); } else { $("#CollegeDropdown").combobox("clear"); } } reload(); } } function reload() { if ($.data($("#SchoolyearDictionaryDropDown")[0], "combobox")) { var schoolYearID = $("#SchoolYearDropdown").combobox("getValue"); var collegeID = $("#CollegeDropdown").combobox("getValue"); var Years = $("#SchoolyearDictionaryDropDown").combobox("getValue"); if (CMS_SystemConfig.ReportType == 1) { if (Years == -1) { $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fCollegeSchedulingView&CollegeID_RAP=" + collegeID + "&SchoolyearID_RAP=" + schoolYearID + "&Years_RAP="); } else { $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fCollegeSchedulingView&CollegeID_RAP=" + collegeID + "&SchoolyearID_RAP=" + schoolYearID + "&Years_RAP=" + Years); } } if (CMS_SystemConfig.ReportType == 2) { var fileUrl = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedulingReport/CollegeSchedulingPDF?CollegeID=" + collegeID + "&SchoolyearID=" + schoolYearID + "&Years=" + (Years == -1 ? "" : Years); $("#reportContent").attr("src", CMS_SystemConfig.VirtualDirectoryPath + "/Scripts/pdf.js/web/viewer.html?file=" + encodeURIComponent(fileUrl)); } } }