CollegeClassmajorFullReport.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. var isFirstLoadCollege = true;
  2. function QueryCollegeDropdownList(data) {
  3. if (((data.length && data.length > 0) || data)) {
  4. if (isFirstLoadCollege) {
  5. isFirstLoadCollege = false;
  6. } else {
  7. if (data.length > 0) {
  8. $("#CollegeDropdown").combobox("setValue", data[0].Value);
  9. } else {
  10. $("#CollegeDropdown").combobox("clear");
  11. }
  12. }
  13. reload();
  14. }
  15. }
  16. function reload() {
  17. if ($.data($("#SchoolyearDictionaryDropDown")[0], "combobox")) {
  18. var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
  19. var collegeID = $("#CollegeDropdown").combobox("getValue");
  20. var Years = $("#SchoolyearDictionaryDropDown").combobox("getValue");
  21. if (CMS_SystemConfig.ReportType == 1) {
  22. if (Years == -1) {
  23. $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fCollegeSchedulingView&CollegeID_RAP=" + collegeID + "&SchoolyearID_RAP=" + schoolYearID + "&Years_RAP=");
  24. }
  25. else {
  26. $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fCollegeSchedulingView&CollegeID_RAP=" + collegeID + "&SchoolyearID_RAP=" + schoolYearID + "&Years_RAP=" + Years);
  27. }
  28. }
  29. if (CMS_SystemConfig.ReportType == 2) {
  30. var fileUrl = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedulingReport/CollegeSchedulingPDF?CollegeID=" + collegeID + "&SchoolyearID=" + schoolYearID + "&Years=" + (Years == -1 ? "" : Years);
  31. $("#reportContent").attr("src", CMS_SystemConfig.VirtualDirectoryPath + "/Scripts/pdf.js/web/viewer.html?file=" + encodeURIComponent(fileUrl));
  32. }
  33. }
  34. }