123456789101112131415161718192021222324252627282930313233343536373839404142 |
- var windowID;
- var inputData;
- var educationSchedulingID;
- var weeklyNums;
- $.parser.onComplete = function () {
- $(function () {
- windowID = $.SystemGeneral.getUrlParam("WindowID");
- inputData = top.$("#" + windowID).data("inputData");
- educationSchedulingID = inputData.EducationSchedulingID;
- weeklyNums = inputData.WeeklyNums.sort(function (a, b) { return parseInt(a) - parseInt(b); });
- var gridData = { rows: $.map(inputData.WeeklyNums, function (x) { return { WeekNum: x }; }), total: inputData.WeeklyNums.length };
- $("#dgWeekList").cmsXDataTable("loadData", gridData);
- });
- };
- function validChoose() {
- var d = [];
- $.each($("#dgWeekList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.WeekNum);
- });
- return d;
- }
- function deleteWeeks() {
- var d = validChoose();
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/EducationSchedule/DeleteWeeks',
- { educationSchedulingID: educationSchedulingID, weekListStr: d.join(',') },
- function(data) {
- if (data.IsSuccess) {
- $.messager.alert("系统提示", "删除成功!");
- top.$("#" + windowID).data("isSuccess", true);
- top.$("#" + windowID).dialog("close");
- } else {
- $.messager.alert("系统提示", data.Message);
- }
- });
- }
|