var isFirstLoadDepartment = true; var isFirstLoadStaff = true; function Report_Search() { var schoolYearID = $("#SchoolYearDropdown").combobox("getValue"); // var collegeID = $("#CollegeDropdown").combobox("getValue"); // collegeID = collegeID == -1 ? ":isnull=true" : "=" + collegeID; var userID = $("#StaffDropdown").combogridX("getValue"); if (userID == -1) { userID = userID == -1 ? "=" : "=" + userID; } else { userID = userID == "" ? "=" : "=" + userID; } $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fAdultTeacherWithScheduleView&UserID_RAP" + userID + "&SchoolyearID_RAP=" + schoolYearID); } function QueryCollegeDropdownList(data) { queryClass(); } function QueryStaffDropdownList(data) { if (((data.length && data.length > 0) || data)) { if (isFirstLoadStaff) { isFirstLoadStaff = false; } else { if (data.length > 0) { $("#StaffDropdown").combogridX("setValue", data[0].Value, reload); } else { $("#StaffDropdown").combogridX("clear"); } } } } function queryClass() { var jsonString = ""; var parameterString = ""; var collegeID = $("#CollegeDropdown").combogridX("getValue"); if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#StaffDropdown").combogridX("reload", eval(jsonString)); } else { $("#StaffDropdown").combogridX("reload"); } reload(); } function reload() { var schoolYearID = $("#SchoolYearDropdown").combobox("getValue"); var collegeID = $("#CollegeDropdown").combogridX("getValue"); var userID = $("#StaffDropdown").combogridX("getValue"); }