MisconductEdit.js 1.0 KB

12345678910111213141516171819202122232425262728
  1. function setName() {
  2. var selectedRow = $("[comboname='UserID']").combogridX("getSelectedRow");
  3. var userNameTD = $("label[for='Name']").parent().next();
  4. if (selectedRow != null) {
  5. userNameTD.html(selectedRow.UserName);
  6. } else {
  7. userNameTD.html(" ");
  8. }
  9. queryCoursematerial();
  10. }
  11. function Misconduct_Save() {
  12. $(document.forms[0]).submit();
  13. }
  14. function queryCoursematerial() {
  15. if ($.data($("[comboname='UserID']")[0], "combogridX") && $.data($("[comboname='SchoolyearID']")[0], "combobox")) {
  16. var schoolyearID = $("[comboname='SchoolyearID']").combobox("getValue");
  17. var userID = $("[comboname='UserID']").combogridX("getValue");
  18. var url = CMS_SystemConfig.VirtualDirectoryPath + "/Misconduct/GetCoursematerial?schoolyearID=" + schoolyearID + "&userID=" + userID;
  19. if (schoolyearID != nonSelect) {
  20. CMSFunction.ComboGrid.SetValue($("[comboname='CoursematerialID']"), "", "");
  21. $("[comboname='CoursematerialID']").combogridX("reload", url);
  22. }
  23. }
  24. }