StudentScoreAdd.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. }
  38. function GetClassName(){
  39. var userID = $("#UserID").combogridX("getValue");
  40. var className = "";
  41. var url = CMS_SystemConfig.VirtualDirectoryPath + '/PersonalScore/GetClassNameByUserID';
  42. if (userID != null && userID != "") {
  43. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/PersonalScore/GetClassNameByUserID', {
  44. userID: userID,
  45. }, function (data) {
  46. //alert(data.Message);
  47. document.getElementById("ClassName").value = data.Message;
  48. //$("#ClassName").attr("value", data.Message);
  49. });
  50. }
  51. }