StudentDetail.cshtml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "Edit";
  5. Guid? RetakePlanID = new Guid(Request["RetakePlanID"]);
  6. var Status = Request["Status"] ?? "";
  7. }
  8. <style type="text/css">
  9. #studentDetail
  10. {
  11. width: 100%;
  12. border: 0px none;
  13. }
  14. #studentDetail tr
  15. {
  16. min-height: 30px;
  17. }
  18. </style>
  19. @section scripts{
  20. <script type="text/javascript">
  21. var nonSelect = "@DropdownList.SELECT_ALL";
  22. //已开班
  23. var CreatedStatus = "@((int)EMIS.ViewModel.ER_RetakePlanStatus.Generated)";
  24. var mnu = "";
  25. //加载
  26. $(function () {
  27. mnu = $.SystemGeneral.getUrlParam("MNU");
  28. })
  29. //刷新
  30. function reload() {
  31. $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
  32. }
  33. //获取选中的数据
  34. function validChoose() {
  35. var d = [];
  36. $.each($("#dgStudentList").cmsXDataTable("getSelections"), function (index) {
  37. d.push(this.UserID);
  38. });
  39. return d;
  40. }
  41. //弹出报名名单
  42. function RetakePlanResultTask_StuAdd() {
  43. $.popupTopWindow('报名名单', CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanResultTask/StudentSelect?FromMNU='
  44. + mnu + "&RetakePlanID=" + '@RetakePlanID', 850, 500, reload);
  45. }
  46. //确定报名
  47. function Addstudents_Confirm(studentList) {
  48. if (studentList == null)
  49. return;
  50. var studentViewList = $("#dgStudentList").cmsXDataTable("getRows");
  51. $.each(studentList, function (index, value) {
  52. if ($.grep(studentViewList, function (row, index) { return value.UserID == row.UserID; }).length == 0) {
  53. studentViewList.push({
  54. UserID: value.UserID,
  55. LoginID: value.StaffCode,
  56. UserName: value.UserName,
  57. SexName: value.SexName,
  58. Years: value.Years,
  59. GrademajorName: value.GrademajorName,
  60. ClassmajorName: value.ClassmajorName,
  61. InSchoolStatusName: value.InSchoolStatusName,
  62. StudentStatusName: value.StudentStatusName
  63. });
  64. }
  65. });
  66. $("#dgStudentList").cmsXDataTable("loadData", { rows: studentViewList, total: studentViewList.length });
  67. }
  68. //取消报名
  69. function RetakePlanResultTask_StuDelete() {
  70. var msg = "";
  71. var d = validChoose().join(',');
  72. if (d == "") {
  73. $.messager.alert("系统提示", "请选择您要取消报名的信息。");
  74. return;
  75. }
  76. $.messager.confirm("系统提示", msg + "您确定要对选择的信息取消报名?", function (r) {
  77. if (r) {
  78. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/RetakePlanResultTask/DeleteStudent', { RetakePlanID: "@RetakePlanID", UserIDs: d }, function (data) {
  79. if (data.IsSuccess = true) {
  80. $("#dgStudentList").cmsXDataTable('load');
  81. }
  82. $.messager.alert("系统提示", data.Message);
  83. });
  84. }
  85. });
  86. }
  87. //Excel导出
  88. function RetakePlanResultTask_StuExcel() {
  89. $("#formQuery").submit();
  90. }
  91. </script>
  92. }
  93. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  94. @using (Ajax.BeginForm(new AjaxOptions
  95. {
  96. OnSuccess = "EMISFunction.FormSuccess",
  97. OnBegin = "EMISFunction.FormSubmit",
  98. OnComplete = "EMISFunction.FormComplete"
  99. }))
  100. {
  101. <div class="p_title">
  102. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  103. 重修报名信息</div>*@
  104. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  105. @Html.ContextMenuBar("StuDetail")
  106. </div>
  107. </div>
  108. <div class="search_list">
  109. <table cellpadding="0" cellspacing="0" id="studentDetail">
  110. <tr>
  111. <td>
  112. @Html.DataGrid(new DataGridOptions
  113. {
  114. Columns = new List<DataGridColumn>()
  115. {
  116. new CheckBoxFieldColumn { HeaderText="", FieldName="UserID" },
  117. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.1 },
  118. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  119. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, Width=0.02 },
  120. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1 },
  121. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.06 },
  122. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.08 },
  123. new BoundFieldColumn { FieldName="CourseTypeDesc", HeaderText="课程类型", Align=AlignStyle.Center, Width=0.05 },
  124. new BoundFieldColumn { FieldName="CourseCredit", HeaderText="学分", Align=AlignStyle.Center, Width=0.02 },
  125. //new BoundFieldColumn { FieldName="SchoolyearNumDesc", HeaderText="开课学年", Align=AlignStyle.Center, Width=0.04 },
  126. new BoundFieldColumn { FieldName="StarttermDesc", HeaderText="开课学期", Align=AlignStyle.Center, Width=0.04 },
  127. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, Width=0.04 },
  128. new BoundFieldColumn { FieldName="RecordStatusName", HeaderText="状态", Align=AlignStyle.Center, Width=0.03 },
  129. new BoundFieldColumn { FieldName="ApplyStatusName", HeaderText="报名状态", Align=AlignStyle.Center, Width=0.04 }
  130. },
  131. PageSize = 30,
  132. IsCheckOnSelect = true,
  133. DataSourceUrl = Url.Content("~/RetakePlanResultTask/StudentDetail?RetakePlanID=" + RetakePlanID),
  134. IsPostBack = true,
  135. ID = "dgStudentList",
  136. IsPagination = true,
  137. IsShowRowNumbers = true,
  138. IsSingleSelect = false,
  139. MaxHeight = 400
  140. })
  141. </td>
  142. </tr>
  143. </table>
  144. </div>
  145. }
  146. <form id="formQuery" method="post" action="@Url.Content("~/RetakePlanResultTask/StudentDetailt_Excel?RetakePlanID=" + RetakePlanID)">
  147. </form>
  148. </div>