AdultClassmajorReport.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. var isFirstLoadGrademajor = true;
  2. var isFirstLoadClassmajor = true;
  3. function Report_Search() {
  4. var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
  5. var classmajorID = $("#ClassmajorDropdown").combogridX("getValue");
  6. if (classmajorID==-1) {
  7. classmajorID = classmajorID == -1 ? "=" : "=" + classmajorID;
  8. }
  9. else {
  10. classmajorID = classmajorID == "" ? "=" : "=" + classmajorID;
  11. }
  12. $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fAdultClassmajorView&ClassmajorID_RAP" + classmajorID + "&SchoolyearID_RAP=" + schoolYearID);
  13. }
  14. function QueryCollegeDropdownList() {
  15. queryClass();
  16. }
  17. function SelectGrademajorDropdownList() {
  18. var url = CMS_SystemConfig.VirtualDirectoryPath + "/Classmajor/BindDropdownListByGrademajorID?bindType=PleaseSelect";
  19. var grademajorID = $("#GrademajorDropdown").combobox("getValue");
  20. if (grademajorID != nonSelect) url += "&grademajorID=" + grademajorID;
  21. $("#ClassmajorDropdown").combobox("reload", url); SelectGrademajorDropdownList
  22. }
  23. function QueryGrademajorDropdownList(data) {
  24. if (((data.length && data.length > 0) || data)
  25. && $("#ClassmajorDropdown").length > 0 && $.data($("#ClassmajorDropdown")[0], "combobox")) {
  26. var url = CMS_SystemConfig.VirtualDirectoryPath + "/Classmajor/BindDropdownListByGrademajorID?bindType=PleaseSelect";
  27. if (isFirstLoadGrademajor) {
  28. isFirstLoadGrademajor = false;
  29. } else {
  30. if (data.length > 0) {
  31. $("#GrademajorDropdown").combobox("setValue", data[0].Value);
  32. } else {
  33. $("#GrademajorDropdown").combobox("clear");
  34. }
  35. }
  36. var grademajorID = $("#GrademajorDropdown").combobox("getValue");
  37. if (grademajorID != nonSelect) url += "&grademajorID=" + grademajorID;
  38. $("#ClassmajorDropdown").combobox("reload", url);
  39. }
  40. }
  41. function QueryClassmajorDropdownList(data) {
  42. if (((data.length && data.length > 0) || data)) {
  43. if (isFirstLoadClassmajor) {
  44. isFirstLoadClassmajor = false;
  45. } else {
  46. if (data.length > 0) {
  47. $("#ClassmajorDropdown").combobox("setValue", data[0].Value);
  48. } else {
  49. $("#ClassmajorDropdown").combobox("clear");
  50. }
  51. }
  52. queryClass();
  53. }
  54. }
  55. function QueryLearningformDropdownList() { }
  56. function SelectClassmajorDropdownList() {
  57. // // var url = CMS_SystemConfig.VirtualDirectoryPath + "/Classmajor/BindDropdownListByYearOrStandard?bindType=PleaseSelect";
  58. // var jsonString = "({'QueryParamsDatas':'";
  59. // var year = $("#DictionarySchoolyear").combobox("getValue");
  60. // //if (year != nonSelect) url += "&year=" + year;
  61. // if (year != nonSelect) jsonString += "DictionaryGrade|*|" + year + "|@|";
  62. // var standardID = $("#DictionaryStandard").combogridX("getValue");
  63. // //if (standardID != nonSelect) url += "&standardID=" + standardID;
  64. // if (standardID != nonSelect) jsonString += "DictionaryStandard|*|" + standardID + "|@|";
  65. // $("#ClassmajorDropdown").combogridX("reload", eval(jsonString + "'})"));
  66. queryClass();
  67. }
  68. function reload() {
  69. var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
  70. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  71. var classmajorID = $("#ClassmajorDropdown").combogridX("getValue");
  72. var standardID = $("#DictionaryStandard").combogridX("getValue");
  73. }
  74. function queryClass() {
  75. var jsonString = "";
  76. var parameterString = "";
  77. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  78. var schoolYearID = $("#DictionarySchoolyear").combobox("getValue");
  79. var standardID = $("#DictionaryStandard").combogridX("getValue");
  80. var educationID = $("#DictionaryEducation").combobox("getValue");
  81. var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  82. var learningFormID = $("#LearningformDictionaryDropDown").combobox("getValue");
  83. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  84. if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|";
  85. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  86. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|";
  87. if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|";
  88. if (LearnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + LearnSystem + "|@|";
  89. if (parameterString != "") {
  90. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  91. $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  92. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  93. } else {
  94. $("#ClassmajorDropdown").combogridX("reload");
  95. $("#DictionaryStandard").combogridX("reload");
  96. }
  97. reload();
  98. }