123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- var jsonString = "";
- var parameterString = "";
- var schoolyearID = $("#ddlSchoolyear").combobox("getValue");
- if (schoolyearID != nonSelect && schoolyearID != "") parameterString += "SchoolYearDropdown|*|" + schoolyearID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#cgExaminationBatch").combogridX("reload", eval(jsonString));
- }
- })
- function schoolyearChange() {
- try {
- var examinationBatchUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationBatch/DropDownList?bindType=0';
- var schoolyearID = $("#ddlSchoolyear").combobox('getValue');
- if (schoolyearID != nonSelect) {
- examinationBatchUrl += "&schoolyearID=" + schoolyearID;
- }
- $("#ddlExaminationBatch").combobox('reload', examinationBatchUrl);
- } catch (e) {
- }
- }
- function examinationBatchChange() {
- try {
- var examinationTypeUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExamBatchProject/TypeDropDownList?bindType=0';
- var examinationBatchID = $("#ddlExaminationBatch").combobox('getValue');
- if (examinationBatchID != nonSelect) {
- examinationTypeUrl += "&examinationBatchID=" + examinationBatchID;
- }
- $("#ddlExaminationType").combobox('reload', examinationTypeUrl);
- } catch (e) {
- }
- }
- function examinationTypeChange() {
- try {
- var examinationProjectUrl = CMS_SystemConfig.VirtualDirectoryPath + '/ExamBatchProject/DropDownList?bindType=0';
- var examinationBatchID = $("#ddlExaminationBatch").combobox('getValue');
- var examinationTypeID = $("#ddlExaminationType").combobox('getValue');
- if (examinationBatchID != nonSelect) {
- examinationProjectUrl += "&examinationBatchID=" + examinationBatchID;
- }
- if (examinationTypeID != nonSelect) {
- examinationProjectUrl += "&examinationTypeID=" + examinationTypeID;
- }
- $("#ddlExaminationProject").combobox('reload', examinationProjectUrl);
- } catch (e) {
- }
- }
- function examinationProjectLoaded() {
- try {
- var collegeUrl = CMS_SystemConfig.VirtualDirectoryPath + '/College/CollegeDropdownListOnlyCollege?bindType=1';
- $("#ddlCollege").combobox('reload', collegeUrl);
- } catch (e) {
- }
- reload();
- }
- function querySchoolYear() {
- var jsonString = "";
- var parameterString = "";
- var schoolyearID = $("#ddlSchoolyear").combobox("getValue");
- if (schoolyearID != nonSelect && schoolyearID != "") parameterString += "SchoolYearDropdown|*|" + schoolyearID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#cgExaminationBatch").combogridX("reload", eval(jsonString));
- }
- //reload();
- }
- function queryBatch() {
- var jsonString = "";
- var parameterString = "";
- var examinationBatchID = $("#cgExaminationBatch").combogridX("getValue");
- var examinationTypeID = $("#cgExaminationType").combogridX("getValue");
- if (examinationBatchID != nonSelect && examinationBatchID != "") parameterString += "cgExaminationBatch|*|" + examinationBatchID + "|@|";
- if (examinationTypeID != nonSelect && examinationTypeID != "") parameterString += "cgExaminationType|*|" + examinationTypeID + "|@|";
- var schoolyearID = $("#ddlSchoolyear").combobox("getValue");
- if (schoolyearID != nonSelect && schoolyearID != "") parameterString += "SchoolYearDropdown|*|" + schoolyearID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#cgExaminationType").combogridX("reload", eval(jsonString));
- $("#cgExaminationProject").combogridX("reload", eval(jsonString));
- }
- //reload();
- }
- function queryType() {
- var jsonString = "";
- var parameterString = "";
- var examinationBatchID = $("#cgExaminationBatch").combogridX("getValue");
- var examinationTypeID = $("#cgExaminationType").combogridX("getValue");
- if (examinationBatchID != nonSelect && examinationBatchID != "") parameterString += "cgExaminationBatch|*|" + examinationBatchID + "|@|";
- if (examinationTypeID != nonSelect && examinationTypeID != "") parameterString += "cgExaminationType|*|" + examinationTypeID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#cgExaminationProject").combogridX("reload", eval(jsonString));
- }
- //reload();
- }
- function collegeChange() {
- try {
- var jsonString = "";
- var parameterString = "";
- var collegeID = $("#ddlCollege").combobox('getValue');
- var yearID = $("#ddlYear").combobox("getValue");
- var schoolAreaID = $("#ddlSchoolArea").combobox("getValue");
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- if (yearID != nonSelect) parameterString += "DictionarySchoolyear|*|" + yearID + "|@|";
- if (schoolAreaID != nonSelect) parameterString += "ddlSchoolArea|*|" + schoolAreaID + "|@|";
- if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#cgbStandard").combogridX("reload", eval(jsonString));
- } else {
- $("#cgbStandard").combogridX("reload");
- }
- } catch (e) {
- }
- }
- function standardChange() {
- try {
- var jsonString = "";
- var parameterString = "";
- var collegeID = $("#ddlCollege").combobox('getValue');
- var yearID = $("#ddlYear").combobox("getValue");
- var standardID = $("#cgbStandard").combogridX("getValue");
- //var schoolAreaID = $("#ddlSchoolArea").combobox("getValue");
- if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
- if (yearID != nonSelect) parameterString += "DictionarySchoolyear|*|" + yearID + "|@|";
- if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
- //if (schoolAreaID != nonSelect) parameterString += "ddlSchoolArea|*|" + schoolAreaID + "|@|";
- //if (parameterString != "") {
- jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
- $("#cgbClassmajor").combogridX("reload", eval(jsonString));
- //} else {
- // $("#cgbClassmajor").combogridX("reload", eval(jsonString));
- //}
- } catch (e) {
- }
- }
- function collegeSelect() {
- collegeChange();
- reload();
- }
- function standardSelect() {
- standardChange();
- reload();
- }
- function reload() {
- $("#dgStudentFeeClassStatisticList").cmsXDataTable("load", $.getDataGridParams("dgStudentFeeClassStatisticList"));
- //$.post(CMS_SystemConfig.VirtualDirectoryPath + '/StudentFee/ClassStatisticTotal', $.getDataGridParams("dgStudentFeeClassStatisticList"),
- // function (res) {
- // if (res) {
- // $("#spnRegistCount").html(res.TotalRegistCount);
- // $("#spnRegistAmount").html(res.TotalRegistAmount);
- // $("#spnPaidCount").html(res.TotalPaidCount);
- // $("#spnPaidAmount").html(res.TotalPaidAmount);
- // }
- // });
- }
- function gridLoaded(data) {
- if (data && data.total) {
- var rows = $("#dgStudentFeeClassStatisticList").cmsXDataTable("getRows");
- if ($.grep(rows, function (x) { return x.Year == null; }).length == 0) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StudentFee/ClassStatisticTotal', $.getDataGridParams("dgStudentFeeClassStatisticList"),
- function (res) {
- if (res) {
- rows.push({
- Year: null,
- CollegeID: null,
- CollegeName: null,
- ClassmajorID: null,
- ClassmajorName: null,
- ExaminationTypeID: null,
- ExaminationTypeName: null,
- ExaminationProjectID: null,
- ExaminationProjectName: null,
- FeeTypeID: null,
- FeeTypeName: null,
- TotalRegistCount: res.TotalRegistCount,
- TotalRegistAmount: res.TotalRegistAmount,
- TotalPaidCount: res.TotalPaidCount,
- TotalPaidAmount: res.TotalPaidAmount,
- TotalRefundCount: res.TotalRefundCount,
- TotalRefundAmount: res.TotalRefundAmount,
- TotalRefundApplyCount: res.TotalRefundApplyCount,
- TotalRefundApplyAmount: res.TotalRefundApplyAmount,
- TotalRefundingCount: res.TotalRefundingCount,
- TotalRefundingAmount: res.TotalRefundingAmount,
- });
- $("#dgStudentFeeClassStatisticList").cmsXDataTable("loadCurPageData", { rows: rows, total: data.total });
- }
- });
- }
- }
- }
- function ClassStatistic_Excel() {
- $("#formQuery").submit();
- }
|