1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- var mnu = "";
- var trainingClassID = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- trainingClassID = $.SystemGeneral.getUrlParam("trainingClassID");
- })
- function validChoose() {
- var d = [];
- $.each($("#dgTrainingClassStudentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.UserID);
- });
- return d;
- }
- function TrainingClass_StudentAdd() {
- $.popupTopWindow('添加学生', CMS_SystemConfig.VirtualDirectoryPath + '/ExaminationApplayStudentList/StudentSelect?MNU=' + mnu, 1024, 768, TrainingClass_StudentAdd_Confirm);
- }
- function TrainingClass_StudentAdd_Confirm(studentList) {
- if (studentList) {
- var ids = $.map(studentList, function (x) { return x.UserID });
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/TrainingClass/AddStudent', { trainingClassID: trainingClassID, studentIDs: ids.join(',') }, function (data) {
- $.messager.alert("系统提示", data.Message);
- if (data.IsSuccess) {
- $("#dgTrainingClassStudentList").cmsXDataTable('load');
- }
- });
- }
- }
- function TrainingClass_StudentDel() {
- var ids = validChoose();
- if (ids.length == 0) {
- $.messager.alert("系统提示", "请选择您要删除的学生。");
- return;
- }
- $.messager.confirm("系统提示", "是否确定删除?", function (r) {
- if (r) {
- $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/TrainingClass/DelStudent', { trainingClassID: trainingClassID, studentIDs: ids.join(',') }, function (data) {
- $.messager.alert("系统提示", data.Message);
- if (data.IsSuccess) {
- $("#dgTrainingClassStudentList").cmsXDataTable('load');
- }
- });
- }
- });
- }
- function TrainingClassStudentList_Send() {
- var userIDs = validChoose();
- if (userIDs.length == 0) {
- $.messager.alert("系统提示", "请选择您要发送信息的学生。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/Common/UserAnnouncementSend";
- $.popupTopWindow('信息发送', redirectTo, 1024, 768, null, userIDs);
- }
|