123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- @using Bowin.Web.Controls.Mvc;
- @using EMIS.Web.Controls;
- @using Bowin.Common.Utility;
- @{
- ViewBag.Title = "List";
- Guid? educationMissionClassID = Request.QueryString["educationMissionClassID"].ParseStrTo<Guid>();
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position:relative;">
- @using (Html.BeginForm())
- {
- <div class="p_title">
- <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
- 排课班学生列表</div>
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("ClassCountStudentList")</div>
- </div>
- <div class="search_list">
- @Html.DataGrid(new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID" ,Width=0.02},
- new BoundFieldColumn { FieldName="LoginID", HeaderText="学生号",Width=0.04,Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="Name", HeaderText="姓名",Width=0.02,Align=AlignStyle.Center },
- new BoundFieldColumn { FieldName="ClassName", HeaderText="学籍班", Align=AlignStyle.Center },
- },
- IsCheckOnSelect = true,
- DataSourceUrl = Url.Content("~/EducationMissionClass/EducationSchedulingClassCountStudentList?educationMissionClassID=" + educationMissionClassID),
- ID = "dgEducationSchedulingClassStudentList",
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false
- })
- </div>
- }
- </div>
- <script type="text/javascript">
- // var url = CMS_SystemConfig.VirtualDirectoryPath + "/EducationMissionClass/EductionMissionClassStudentAdd";
- // var mnu = "";
- // $(function () {
- // //mnu = $.SystemGeneral.getUrlParam("MNU");
- // })
- function EducationSchedulingClassCountStudent_Export() {
- window.open('@Url.Content("~/EducationMissionClass/StudentExport?educationMissionClassID=" + Request["educationMissionClassID"])');
- }
- // function ApprovalStatusName() {
- // var d = 0;
- // $.each($("#dgEducationSchedulingClassStudentList").cmsXDataTable("getSelections"), function (index) {
- // d = this.ApprovalStatusName;
- // });
- // return d;
- // }
-
- //添加学生
- function EducationSchedulingClassCountStudent_Add() {
-
- var statusName = '@ViewBag.approvalStatusName';
- mnu = '@ViewBag.mnu';
- var educationMissionClassID = '@ViewBag.educationMissionClassID';
- if (statusName == "已提交" || statusName == "已排课") {
- $.messager.alert("系统提示", "该数据已经提交或已排课,不能添加学生!");
- return;
- }
- $.popupTopWindow('学生信息', CMS_SystemConfig.VirtualDirectoryPath + '/Common/StudentViewSelect?FromMNU=' + mnu + "&educationMissionClassID=" + educationMissionClassID, 770, 420, AddStudent_Confirm);
-
- }
- function validChoose() {
- var d = [];
- $.each($("#dgEducationSchedulingClassStudentList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.UserID);
- });
- return d;
- }
- function AddStudent_Confirm(studentList) {
- //debugger;
- var d = '@ViewBag.educationMissionClassID';
- var student = [];
- $.each(studentList, function (index, value) {
- student.push(value.UserID);
- });
- var userIDs = student.join(',');
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/EductionMissionClassStudentAdd', { educationMissionClassID: d, userIDs: userIDs }, function (data) {
- if (data == "成功") {
- $.messager.alert("系统提示", "增加学生成功!");
- $("#dgEducationSchedulingClassStudentList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- // function StudentCount() {
- // var d = 0;
- // $.each($("#dgFinalExaminationList").cmsXDataTable("getSelections"), function (index) {
- // d = this.StudentCount;
- // });
- // return d;
- // }
- //删除学生
- function EducationSchedulingClassCountStudent_Delete() {
- //debugger;
- var d = validChoose().join(',');
- var statusName = '@ViewBag.approvalStatusName';
- var educationMissionClassID = '@ViewBag.educationMissionClassID';
- //var count = StudentCount();
- if (statusName == "已提交" || statusName == "已排课") {
- $.messager.alert("系统提示", "该数据已经提交或已排课,不能删除学生!");
- return;
- }
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的学生!");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除该学生?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/EducationMissionClass/EductionMissionClassStudentDelete', { educationMissionClassID: educationMissionClassID, userIDs: d }, function (data) {
- if (data == "成功") {
- $.messager.alert("系统提示", "删除成功!");
- $("#dgEducationSchedulingClassStudentList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- </script>
|