AdultTeacherReport.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. var isFirstLoadDepartment = true;
  2. var isFirstLoadStaff = true;
  3. function Report_Search() {
  4. var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
  5. // var collegeID = $("#CollegeDropdown").combobox("getValue");
  6. // collegeID = collegeID == -1 ? ":isnull=true" : "=" + collegeID;
  7. var userID = $("#StaffDropdown").combogridX("getValue");
  8. if (userID == -1) {
  9. userID = userID == -1 ? "=" : "=" + userID;
  10. }
  11. else {
  12. userID = userID == "" ? "=" : "=" + userID;
  13. }
  14. $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fAdultTeacherWithScheduleView&UserID_RAP" + userID + "&SchoolyearID_RAP=" + schoolYearID);
  15. }
  16. function QueryCollegeDropdownList(data) {
  17. queryClass();
  18. }
  19. function QueryStaffDropdownList(data) {
  20. if (((data.length && data.length > 0) || data)) {
  21. if (isFirstLoadStaff) {
  22. isFirstLoadStaff = false;
  23. } else {
  24. if (data.length > 0) {
  25. $("#StaffDropdown").combogridX("setValue", data[0].Value, reload);
  26. } else {
  27. $("#StaffDropdown").combogridX("clear");
  28. }
  29. }
  30. }
  31. }
  32. function queryClass() {
  33. var jsonString = "";
  34. var parameterString = "";
  35. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  36. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  37. if (parameterString != "") {
  38. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  39. $("#StaffDropdown").combogridX("reload", eval(jsonString));
  40. } else {
  41. $("#StaffDropdown").combogridX("reload");
  42. }
  43. reload();
  44. }
  45. function reload() {
  46. var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
  47. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  48. var userID = $("#StaffDropdown").combogridX("getValue");
  49. }