AdjustmentBatchEdit.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. var inputData;
  2. var classroomTypeID;
  3. var educationSchedulingIDs;
  4. $.parser.onComplete = function (context) {
  5. inputData = top.$("#" + windowID).data("inputData");
  6. classroomTypeID = inputData.classroomTypeID;
  7. educationSchedulingIDs = inputData.educationSchedulingWeekNumIDs;
  8. }
  9. function refreshWeekList() {
  10. var url = CMS_SystemConfig.VirtualDirectoryPath + '/SchoolYear/GetFutureWeekListDropdown?bindType=0'
  11. var weekNum = $("[comboname='ddlWeekNum']").combobox('getValue');
  12. if (weekNum && weekNum != nonSelect) {
  13. url += "&weekNum=" + weekNum;
  14. $("[comboname='ddlWeekday']").combobox('clear');
  15. $("[comboname='ddlWeekday']").combobox('reload', url);
  16. }
  17. }
  18. function refreshCourseTimeList() {
  19. var url = CMS_SystemConfig.VirtualDirectoryPath + '/CoursesTime/DropDownForAdjustmentBatch?bindType=0';
  20. if (educationSchedulingIDs != null) {
  21. url = url + '&educationSchedulingIDs=' + educationSchedulingIDs;
  22. }
  23. var weekNum = $("[comboname='ddlWeekNum']").combobox('getValue');
  24. if (weekNum && weekNum != nonSelect) {
  25. url += "&weekNum=" + weekNum;
  26. }
  27. var weekday = $("[comboname='ddlWeekday']").combobox('getValue');
  28. if (weekday && weekday != nonSelect) {
  29. url += "&weekday=" + weekday;
  30. }
  31. var teacherID = $("#cbgUser").combogridX('getValue');
  32. if (teacherID && teacherID != nonSelect) {
  33. url += "&teacherID=" + teacherID;
  34. }
  35. $("[comboname='ddlCoursesTime']").combobox('clear');
  36. $("[comboname='ddlCoursesTime']").combobox('reload', url);
  37. }
  38. function getClassroom(toCoursesTimeID) {
  39. var classroomTypeID = $("[comboname='ddlClassroomType']").combobox('getValue');
  40. if (classroomTypeID == nonSelect) {
  41. classroomTypeID = "";
  42. }
  43. try {
  44. var jsonString = "({'QueryParamsDatas':'";
  45. if (classroomTypeID != nonSelect) {
  46. jsonString += "ClassroomTypeDictionary|*|" + classroomTypeID + "|@|";
  47. }
  48. jsonString += "'})";
  49. $("[comboname='cbgClassroom']").combogridX("reload", eval(jsonString));
  50. } catch (e) { }
  51. }
  52. function AdjustmentBatchEdit_Confirm() {
  53. top.$("#" + windowID).data("resultData", {
  54. WeekNum: $("[comboname='ddlWeekNum']").combobox("getValue"),
  55. Weekday: $("[comboname='ddlWeekday']").combobox("getValue"),
  56. User: $("[comboname='cbgUser']").combogridX("getValue"),
  57. CoursesTime: $("[comboname='ddlCoursesTime']").combobox("getValue"),
  58. ClassroomType: $("[comboname='ddlClassroomType']").combobox("getValue"),
  59. Classroom: $("[comboname='cbgClassroom']").combogridX("getValue")
  60. });
  61. top.$("#" + windowID).dialog("close");
  62. }