AdultExaminationSchedule.js 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. var isFirstLoadSchoolyear = true;
  2. var startDate = "";
  3. var endDate = "";
  4. function startDateChanged(dp) {
  5. startDate = dp.cal.getNewDateStr();
  6. reload();
  7. }
  8. function startDateCleared(dp) {
  9. startDate = "";
  10. reload();
  11. }
  12. function endDateChanged(dp) {
  13. endDate = dp.cal.getNewDateStr();
  14. reload();
  15. }
  16. function endDateCleared(dp) {
  17. endDate = "";
  18. reload();
  19. }
  20. function SchoolyearLoaded(data) {
  21. if (((data.length && data.length > 0) || data)) {
  22. if (isFirstLoadSchoolyear) {
  23. isFirstLoadSchoolyear = false;
  24. } else {
  25. reload();
  26. }
  27. }
  28. }
  29. function queryStandard() {
  30. if ($.data($("#cbgCollege")[0], "combogridX") && $.data($("#ddlYear")[0], "combobox")) {
  31. var parameterString = "";
  32. var collegeID = $("#cbgCollege").combogridX("getValue");
  33. var year = $("#ddlYear").combobox("getValue");
  34. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  35. if (year != nonSelect) parameterString += "DictionaryGrade|*|" + year + "|@|";
  36. if (parameterString != "") {
  37. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  38. $("#cbgStandard").combogridX("reload", eval(jsonString));
  39. } else {
  40. $("#cbgStandard").combogridX("reload");
  41. }
  42. }
  43. reload();
  44. }
  45. function queryClassmajor() {
  46. if ($.data($("#cbgCollege")[0], "combogridX") && $.data($("#ddlYear")[0], "combobox") && $.data($("#cbgStandard")[0], "combogridX")) {
  47. var parameterString = "";
  48. var collegeID = $("#cbgCollege").combogridX("getValue");
  49. var year = $("#ddlYear").combobox("getValue");
  50. var standard = $("#cbgStandard").combogridX("getValue");
  51. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  52. if (year != nonSelect) parameterString += "DictionaryGrade|*|" + year + "|@|";
  53. if (standard != nonSelect && standard != "") parameterString += "DictionaryStandard|*|" + standard + "|@|";
  54. if (parameterString != "") {
  55. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  56. $("#cbgClassmajor").combogridX("reload", eval(jsonString));
  57. } else {
  58. $("#cbgClassmajor").combogridX("reload");
  59. }
  60. }
  61. reload();
  62. }
  63. function reload() {
  64. var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
  65. var examsCategoryID = $("#ddlExamsCategory").combobox("getValue");
  66. var statusID = $("#ddlExaminationPlanStatus").combobox("getValue");
  67. var coursematerialID = $("#cbgCoursematerial").combogridX("getValue");
  68. var collegeID = $("#cbgCollege").combogridX("getValue");
  69. var year = $("#ddlYear").combobox("getValue");
  70. var standardID = $("#cbgStandard").combogridX("getValue");
  71. var classmajorID = $("#cbgClassmajor").combogridX("getValue");
  72. var classroomID = $("#cbgClassroom").combogridX("getValue");
  73. var exmiantionTeacherID = $("#cbgExaminationTeacher").combogridX("getValue");
  74. var assistantUserID = $("#cbgAssistant").combogridX("getValue");
  75. var examsCategoryString = "ExamsCategoryID_RAP=";
  76. if (examsCategoryID != nonSelect) {
  77. examsCategoryString = "ExamsCategoryID_RAP=" + examsCategoryID;
  78. }
  79. var statusString = "RecordStatus_RAP=";
  80. if (statusID != nonSelect) {
  81. statusString = "RecordStatus_RAP=" + statusID;
  82. }
  83. var startDateString = "StartDate_RAP=";
  84. if (startDate != "") {
  85. startDateString = "StartDate_RAP=" + startDate;
  86. }
  87. var endDateString = "EndDate_RAP=";
  88. if (endDate != "") {
  89. endDateString = "EndDate_RAP=" + endDate;
  90. }
  91. var coursematerialString = "CoursematerialID_RAP=";
  92. if (coursematerialID != "") {
  93. coursematerialString = "CoursematerialID_RAP=" + coursematerialID;
  94. }
  95. var collegeString = "CollegeID_RAP=";
  96. if (collegeID != "") {
  97. collegeString = "CollegeID_RAP=" + collegeID;
  98. }
  99. var yearString = "Year_RAP=";
  100. if (year != nonSelect) {
  101. yearString = "Year_RAP=" + year;
  102. }
  103. var standardString = "StandardID_RAP=";
  104. if (standardID != "") {
  105. standardString = "StandardID_RAP=" + standardID;
  106. }
  107. var classmajorString = "ClassmajorID_RAP=";
  108. if (classmajorID != "") {
  109. classmajorString = "ClassmajorID_RAP=" + classmajorID;
  110. }
  111. var classroomString = "ClassroomID_RAP=";
  112. if (classroomID != "") {
  113. classroomString = "ClassroomID_RAP=" + classroomID;
  114. }
  115. var exmiantionTeacherString = "ExminationTeacherID_RAP=";
  116. if (exmiantionTeacherID != "") {
  117. exmiantionTeacherString = "ExminationTeacherID_RAP=" + exmiantionTeacherID;
  118. }
  119. var assistantUserString = "AssistantUserID_RAP=";
  120. if (assistantUserID != "") {
  121. assistantUserString = "AssistantUserID_RAP=" + assistantUserID;
  122. }
  123. $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fExaminationManage%2fExaminationSchedule_DGLG&SchoolyearID_RAP=" + schoolYearID
  124. + "&" + statusString
  125. + "&" + examsCategoryString
  126. + "&" + startDateString
  127. + "&" + endDateString
  128. + "&" + coursematerialString
  129. + "&" + classmajorString
  130. + "&" + classroomString
  131. + "&" + assistantUserString
  132. + "&" + collegeString
  133. + "&" + standardString
  134. + "&" + yearString
  135. + "&" + exmiantionTeacherString);
  136. }