StudentScoreEdit.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. function StudentScore_Save() {
  2. var userID = $("#UserID").combogridX("getValue");
  3. var coursematerialID = $("#CoursematerialID").combogridX("getValue");
  4. var examsCategoryID = $("#ExamsCategoryID").combobox("getValue");
  5. var startTermID = $("#StarttermID").combobox("getValue");
  6. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StudentScore/ValidateDuplicate', {
  7. submitedScoreID: $.SystemGeneral.getUrlParam("submitedScoreID"),
  8. userID: userID,
  9. coursematerialID: coursematerialID,
  10. examsCategoryID: examsCategoryID,
  11. startTermID: startTermID
  12. }, function (data) {
  13. if (data.IsSuccess) {
  14. $(document.forms[0]).submit();
  15. } else {
  16. $.messager.confirm('提示', data.Message, function (r) {
  17. if (r) {
  18. $(document.forms[0]).submit();
  19. }
  20. });
  21. }
  22. });
  23. }
  24. function selectSchoolyearNum() {
  25. var schoolyearNum = $("#SchoolyearNumID").combobox("getValue");
  26. var startTermObj = $("#StarttermID");
  27. var startTerm = startTermObj.combobox("getValue");
  28. if (startTerm > (schoolyearNum * 2) || startTerm < ((schoolyearNum - 1) * 2)) {
  29. startTermObj.combobox("setValue", (schoolyearNum * 2) - 1);
  30. }
  31. }
  32. function selectStartTerm() {
  33. var schoolyearNumObj = $("#SchoolyearNumID");
  34. var startTermObj = $("#StarttermID");
  35. var startTerm = startTermObj.combobox("getValue");
  36. schoolyearNumObj.combobox("setValue", Math.ceil(parseFloat(startTerm) / parseFloat(2)));
  37. }