Resit.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. $(function () {
  2. mnu = $.SystemGeneral.getUrlParam("MNU");
  3. })
  4. function schoolyearChange() {
  5. try {
  6. var examinationBatchUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationBatch/DropDownList?bindType=0';
  7. var schoolyearID = $("#ddlSchoolyear").combobox('getValue');
  8. if (schoolyearID != nonSelect) {
  9. examinationBatchUrl += "&schoolyearID=" + schoolyearID;
  10. }
  11. $("#ddlExaminationBatch").combobox('reload', examinationBatchUrl);
  12. } catch (e) {
  13. }
  14. }
  15. function examinationBatchChange() {
  16. try {
  17. var examinationTypeUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExamBatchProject/TypeDropDownList?bindType=0';
  18. var examinationBatchID = $("#ddlExaminationBatch").combobox('getValue');
  19. if (examinationBatchID != nonSelect) {
  20. examinationTypeUrl += "&examinationBatchID=" + examinationBatchID;
  21. }
  22. $("#ddlExaminationType").combobox('reload', examinationTypeUrl);
  23. } catch (e) {
  24. }
  25. }
  26. function examinationTypeChange() {
  27. try {
  28. var examinationProjectUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExamBatchProject/DropDownList?bindType=0';
  29. var examinationBatchID = $("#ddlExaminationBatch").combobox('getValue');
  30. var examinationTypeID = $("#ddlExaminationType").combobox('getValue');
  31. if (examinationBatchID != nonSelect) {
  32. examinationProjectUrl += "&examinationBatchID=" + examinationBatchID;
  33. }
  34. if (examinationTypeID != nonSelect) {
  35. examinationProjectUrl += "&examinationTypeID=" + examinationTypeID;
  36. }
  37. $("#ddlExaminationProject").combobox('reload', examinationProjectUrl);
  38. } catch (e) {
  39. }
  40. }
  41. function examinationProjectLoaded() {
  42. try {
  43. var examinationSubjectUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ChargeProject/ExaminationSubjectDropdownList?bindType=0';
  44. var examinationProjectID = $("#ddlExaminationProject").combobox('getValue');
  45. if (examinationProjectID != nonSelect) {
  46. examinationSubjectUrl += "&examinationProjectID=" + examinationProjectID;
  47. }
  48. $("#ddlExaminationSubject").combobox('reload', examinationSubjectUrl);
  49. } catch (e) {
  50. }
  51. }
  52. function examinationSubjectLoaded() {
  53. try {
  54. var collegeUrl = CMS_SystemConfig.VirtualDirectoryPath + '/College/CollegeDropdownListOnlyCollege?bindType=1';
  55. $("#ddlCollege").combobox('reload', collegeUrl);
  56. } catch (e) {
  57. }
  58. reload();
  59. }
  60. function collegeChange() {
  61. try {
  62. var jsonString = "";
  63. var parameterString = "";
  64. var collegeID = $("#ddlCollege").combobox('getValue');
  65. var schoolAreaID = $("#ddlSchoolArea").combobox("getValue");
  66. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  67. if (schoolAreaID != nonSelect) parameterString += "ddlSchoolArea|*|" + schoolAreaID + "|@|";
  68. if (parameterString != "") {
  69. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  70. $("#cgbStandard").combogridX("reload", eval(jsonString));
  71. } else {
  72. $("#cgbStandard").combogridX("reload");
  73. }
  74. } catch (e) {
  75. }
  76. }
  77. function standardChange() {
  78. try {
  79. var jsonString = "";
  80. var parameterString = "";
  81. var collegeID = $("#ddlCollege").combobox('getValue');
  82. var yearID = $("#ddlYear").combobox("getValue");
  83. var standardID = $("#cgbStandard").combogridX("getValue");
  84. var schoolAreaID = $("#ddlSchoolArea").combobox("getValue");
  85. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  86. if (yearID != nonSelect) parameterString += "DictionarySchoolyear|*|" + yearID + "|@|";
  87. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  88. if (schoolAreaID != nonSelect) parameterString += "ddlSchoolArea|*|" + schoolAreaID + "|@|";
  89. if (parameterString != "") {
  90. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  91. $("#cgbClassmajor").combogridX("reload", eval(jsonString));
  92. } else {
  93. $("#cgbClassmajor").combogridX("reload");
  94. }
  95. } catch (e) {
  96. }
  97. }
  98. function collegeSelect() {
  99. collegeChange();
  100. reload();
  101. }
  102. function standardSelect() {
  103. standardChange();
  104. reload();
  105. }
  106. function reload() {
  107. $("#dgResitList").cmsXDataTable("load", $.getDataGridParams("dgResitList"));
  108. }
  109. function Resit_Export() {
  110. $("#formQuery").submit();
  111. }