GdssStudentSelect.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. var inputData;
  2. var windowID;
  3. function validChoose() {
  4. var d = [];
  5. $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
  6. d.push(this);
  7. });
  8. return d;
  9. };
  10. function reload() {
  11. $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
  12. };
  13. $.parser.onComplete = function () {
  14. $(function () {
  15. windowID = $.SystemGeneral.getUrlParam("WindowID");
  16. inputData = top.$("#" + windowID).data("inputData");
  17. reload();
  18. });
  19. };
  20. function SelectCollegeComboGrid() {
  21. var collegeID = $("#CollegeComboGrid").combogridX("getValue");
  22. if (collegeID != nonSelect) {
  23. var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID + "|@|'})";
  24. $("#GrademajorComboGrid").combogridX("reload", eval(jsonString));
  25. }
  26. reload();
  27. };
  28. function SelectGrademajorComboGrid() {
  29. var grademajorID = $("#GrademajorComboGrid").combogridX("getValue");
  30. if (grademajorID != nonSelect) {
  31. var jsonString = "({'QueryParamsDatas':'GrademajorComboGrid|*|" + grademajorID + "|@|'})";
  32. $("#ClassmajorComboGrid").combogridX("reload", eval(jsonString));
  33. }
  34. reload();
  35. };
  36. function Student_Confirm() {
  37. var d = validChoose();
  38. if (d.length == 0) {
  39. $.messager.alert("系统提示", "请选择您要添加的学生。");
  40. return;
  41. }
  42. // if (d.length > inputData.limit) {
  43. // $.messager.alert("系统提示", "由于座位安排的限制,目前该教室只能再容纳" + inputData.limit + "人。");
  44. // return;
  45. // }
  46. top.$("#" + windowID).data("resultData", d);
  47. top.$("#" + windowID).dialog("close");
  48. };