ExaminationScoreEdit.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. var mnu;
  2. var examinationScoreID;
  3. var nonSelect;
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. examinationScoreID = $.SystemGeneral.getUrlParam("ExaminationScoreID");
  7. nonSelect = "-1";
  8. });
  9. function ExaminationScore_Save() {
  10. $(document.forms[0]).submit();
  11. }
  12. function schoolyearChange() {
  13. try {
  14. var examinationBatchUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationBatch/DropDownList?bindType=0';
  15. var schoolyearID = $("#SchoolyearID").combobox('getValue');
  16. if (schoolyearID != nonSelect) {
  17. examinationBatchUrl += "&schoolyearID=" + schoolyearID;
  18. }
  19. $("#ExaminationBatchID").combobox('reload', examinationBatchUrl);
  20. //reload();
  21. } catch (e) {
  22. }
  23. }
  24. function examinationBatchChange() {
  25. try {
  26. var examinationTypeUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExamBatchProject/TypeDropDownList?bindType=0';
  27. var examinationBatchID = $("#ExaminationBatchID").combobox('getValue');
  28. if (examinationBatchID != nonSelect) {
  29. examinationTypeUrl += "&examinationBatchID=" + examinationBatchID;
  30. }
  31. $("#ExaminationTypeID").combobox('reload', examinationTypeUrl);
  32. //reload();
  33. } catch (e) {
  34. }
  35. }
  36. function examinationTypeChange() {
  37. try {
  38. var examinationProjectUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExamBatchProject/DropDownList?bindType=0';
  39. var examinationBatchID = $("#ExaminationBatchID").combobox('getValue');
  40. var examinationTypeID = $("#ExaminationTypeID").combobox('getValue');
  41. if (examinationBatchID != nonSelect) {
  42. examinationProjectUrl += "&examinationBatchID=" + examinationBatchID;
  43. }
  44. if (examinationTypeID != nonSelect) {
  45. examinationProjectUrl += "&examinationTypeID=" + examinationTypeID;
  46. }
  47. $("#ExaminationProjectID").combobox('reload', examinationProjectUrl);
  48. //reload();
  49. } catch (e) {
  50. }
  51. }
  52. function examinationProjectChange() {
  53. try {
  54. var examinationSubjectUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationScore/SubjectDropDownList?bindType=0';
  55. var examinationProjectID = $("#ExaminationProjectID").combobox("getValue");
  56. if (examinationProjectID != nonSelect && examinationProjectID != ""){
  57. examinationSubjectUrl += "&examinationProjectID=" + examinationProjectID;
  58. }
  59. //var examinationTypeID = $("#ExaminationTypeID").combobox('getValue');
  60. //if (examinationTypeID != nonSelect) {
  61. // examinationProjectUrl += "&examinationTypeID=" + examinationTypeID;
  62. //}
  63. $("#ExaminationSubjectID").combobox('reload', examinationSubjectUrl);
  64. //reload();
  65. } catch (e) {
  66. }
  67. }
  68. function setUserName() {
  69. var jsonString = "";
  70. var parameterString = "";
  71. var userID = $("#UserIDForIDNumber").combogridX("getValue");
  72. if (userID != nonSelect) {
  73. $("#UserID").combogridX("setValue", userID);
  74. }
  75. else {
  76. $("#UserID").combogridX("setValue", "-1");
  77. }
  78. }
  79. function querySchoolYear() {
  80. var jsonString = "";
  81. var parameterString = "";
  82. var schoolyearID = $("#SchoolYearDropdown").combobox("getValue");
  83. if (schoolyearID != nonSelect && schoolyearID != "") parameterString += "SchoolYearDropdown|*|" + schoolyearID + "|@|";
  84. //if (parameterString != "") {
  85. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  86. $("#ExaminationBatchID").combogridX("reload", eval(jsonString));
  87. //}
  88. //else {
  89. // $("#ExaminationBatchID").combogridX("reload");
  90. //}
  91. }
  92. function queryProject() {
  93. var jsonString = "";
  94. var parameterString = "";
  95. var examinationBatchID = $("#ExaminationBatchID").combogridX("getValue");
  96. var examinationTypeID = $("#ExaminationTypeID").combogridX("getValue");
  97. if (examinationBatchID != nonSelect && examinationBatchID != "") parameterString += "cgExaminationBatch|*|" + examinationBatchID + "|@|";
  98. if (examinationTypeID != nonSelect && examinationTypeID != "") parameterString += "cgExaminationType|*|" + examinationTypeID + "|@|";
  99. //if (parameterString != "") {
  100. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  101. $("#ExaminationProjectID").combogridX("reload", eval(jsonString));
  102. //}
  103. //else {
  104. // $("#ExaminationProjectID").combogridX("reload");
  105. //}
  106. }
  107. function querySubject() {
  108. var jsonString = "";
  109. var parameterString = "";
  110. var examinationProjectID = $("#ExaminationProjectID").combobox("getValue");
  111. if (examinationProjectID != nonSelect && examinationProjectID != "") parameterString += "cgExaminationProject|*|" + examinationProjectID + "|@|";
  112. if (parameterString != "") {
  113. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  114. $("#ExaminationSubjectID").combogridX("reload", eval(jsonString));
  115. //$("#ExaminationSubjectID").combogridX("setValue", subjectID);
  116. }
  117. //else {
  118. // $("#ExaminationSubjectID").combogridX("reload");
  119. // //$("#ExaminationSubjectID").combogridX("setValue", subjectID);
  120. //}
  121. }
  122. function setSubjectSelect() {
  123. $("#ExaminationSubjectID").combogridX("setValue", subjectID);
  124. }
  125. function queryClass() {
  126. var jsonString = "";
  127. var parameterString = "";
  128. var collegeID = $("#cgCollege").combogridX("getValue");
  129. var schoolYearID = $("#ddlYear").combobox("getValue");
  130. var standardID = $("#ddlStandard").combogridX("getValue");
  131. if (collegeID != nonSelect && collegeID != "") parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  132. if (schoolYearID != nonSelect && schoolYearID != "") parameterString += "DictionarySchoolyear|*|" + schoolYearID + "|@|";
  133. if (standardID != nonSelect && standardID != "") parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  134. //if (parameterString != "") {
  135. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  136. $("#ddlStandard").combogridX("reload", eval(jsonString));
  137. $("#cgClassmajor").combogridX("reload", eval(jsonString));
  138. //} else {
  139. // $("#ddlStandard").combogridX("reload");
  140. // $("#cgClassmajor").combogridX("reload");
  141. //}
  142. }