UserDataRange.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. function changeDataRange() {
  2. var dataRangeValue = $("#DataRange").combobox("getValue");
  3. if (dataRangeValue == campusTypeValue) {
  4. $("#CampusList").css("display", "");
  5. $("#CollegeList").css("display", "none");
  6. $("#DepartmentList").css("display", "none");
  7. } else if (dataRangeValue == collegeTypeValue) {
  8. $("#CampusList").css("display", "none");
  9. $("#CollegeList").css("display", "");
  10. $("#DepartmentList").css("display", "none");
  11. } else if (dataRangeValue == departmentTypeValue) {
  12. $("#CampusList").css("display", "none");
  13. $("#CollegeList").css("display", "none");
  14. $("#DepartmentList").css("display", "");
  15. } else {
  16. $("#CampusList").css("display", "none");
  17. $("#CollegeList").css("display", "none");
  18. $("#DepartmentList").css("display", "none");
  19. }
  20. }
  21. function User_DataRange_Save() {
  22. var dataRangeValue = $("#DataRange").combobox("getValue");
  23. if (dataRangeValue == campusTypeValue) {
  24. var selectedCampus = $("input[name='CampusList']:checked").map(function (index, elem) { return $(elem).val(); }).get().join(',');
  25. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/User/SaveUserCampus', {
  26. userID: $.SystemGeneral.getUrlParam("UserID"),
  27. campusIDList: selectedCampus
  28. }, EMISFunction.FormSuccess, 'json');
  29. } else if (dataRangeValue == collegeTypeValue) {
  30. var selectedCollege = $("input[name='CollegeList']:checked").map(function (index, elem) { return $(elem).val(); }).get().join(',');
  31. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/User/SaveUserCollege', {
  32. userID: $.SystemGeneral.getUrlParam("UserID"),
  33. collegeIDList: selectedCollege
  34. }, EMISFunction.FormSuccess, 'json');
  35. } else if (dataRangeValue == departmentTypeValue) {
  36. var selectedDepartment = $("input[name='DepartmentList']:checked").map(function (index, elem) { return $(elem).val(); }).get().join(',');
  37. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/User/SaveUserDepartment', {
  38. userID: $.SystemGeneral.getUrlParam("UserID"),
  39. departmentIDList: selectedDepartment
  40. }, EMISFunction.FormSuccess, 'json');
  41. }
  42. }