ClassStudentListView.cshtml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "ClassStudentListView";
  5. Guid? classmajorID = new Guid(Request["classmajorID"]);
  6. int? inschoolstatus = Convert.ToInt32(Request["inschoolstatus"]);
  7. }
  8. @section scripts{
  9. <script type="text/javascript">
  10. var nonSelect = "@DropdownList.SELECT_ALL";
  11. //刷新
  12. function reload() {
  13. $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
  14. }
  15. //设置列颜色为红色
  16. function SetRedColumn(index, row, value) {
  17. return " <span style=\"color: red;\">" + value + "</span>";
  18. }
  19. //Excel导出
  20. function ClassmajorStu_DetailExport() {
  21. $("#formQuery").submit();
  22. }
  23. </script>
  24. }
  25. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  26. <form id="formQuery" method="post" action="@Url.Content("~/Classmajor/Excel_ClassStudent?classmajorID=" + classmajorID + "&DictionaryInschoolStatus=" + inschoolstatus)">
  27. @Html.PositionCondition("ClassmajorStudent")
  28. <div class="p_title">
  29. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  30. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("StuDetail")</div>
  31. </div>
  32. </form>
  33. <div class="search_list">
  34. <table cellpadding="0" cellspacing="0" id="classmajortable">
  35. <tr>
  36. <td>
  37. @Html.DataGrid(new DataGridOptions
  38. {
  39. Columns = new List<DataGridColumn>()
  40. {
  41. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID" },
  42. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.08 },
  43. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  44. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, Width=0.02 },
  45. new BoundFieldColumn { FieldName="SchoolyearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" },
  46. //new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
  47. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1 },
  48. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  49. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, Width=0.04 }
  50. },
  51. IsPostBack = true,
  52. IsCheckOnSelect = true,
  53. DataSourceUrl = Url.Content("~/Classmajor/ClassStudentListView?classmajorID=" + classmajorID + "&DictionaryInschoolStatus=" + inschoolstatus),
  54. ID = "dgStudentList",
  55. IsPagination = true,
  56. IsShowRowNumbers = true,
  57. IsSingleSelect = false
  58. })
  59. </td>
  60. </tr>
  61. </table>
  62. </div>
  63. </div>