ClassStudentListView.cshtml 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "ClassStudentListView";
  5. Guid? grademajorID = new Guid(Request["grademajorID"]);
  6. int? inschoolstatus = Convert.ToInt32(Request["inschoolstatus"] == null ? "-1" : 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 GrademajorStu_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("~/Grademajor/Excel_ClassStudent?grademajorID=" + grademajorID)">
  27. @Html.PositionCondition("GrademajorStudent")
  28. <div class="search_keyword">
  29. <div class="search_input">
  30. <ul>
  31. <li class="sn" style="padding-left: 5px;color: red;">在校状态:</li>
  32. <li class="sv">
  33. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_INOrOutSchoolStatus, new DropdownListOptions
  34. {
  35. ID = "DictionaryInschoolStatus",
  36. Name = "DictionaryInschoolStatus",
  37. BindType = DropdownListBindType.SelectAll,
  38. OnSelect = "reload",
  39. SelectedValue = (int)inschoolstatus
  40. }, new Dictionary<string, string> { { "data-condition", "dgStudentList" } })
  41. </li>
  42. </ul>
  43. </div>
  44. </div>
  45. <div class="p_title">
  46. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  47. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("StuDetail")</div>
  48. </div>
  49. </form>
  50. <div class="search_list">
  51. @Html.DataGrid(new DataGridOptions
  52. {
  53. Columns = new List<DataGridColumn>()
  54. {
  55. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID" },
  56. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.08 },
  57. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  58. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, OrderFieldName="SexID", Width=0.02 },
  59. new BoundFieldColumn { FieldName="GradeID", HeaderText="年级", Align=AlignStyle.Center, OrderFieldName="GradeID", Width=0.03, CustomFormatFun="SetRedColumn" },
  60. //new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
  61. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1 },
  62. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, OrderFieldName="InSchoolStatusID", Width=0.04, CustomFormatFun="SetRedColumn" },
  63. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, OrderFieldName="StudentStatus", Width=0.04 }
  64. },
  65. IsPostBack = true,
  66. IsCheckOnSelect = true,
  67. DataSourceUrl = Url.Content("~/Grademajor/ClassStudentListView?grademajorID=" + grademajorID),
  68. ID = "dgStudentList",
  69. IsPagination = true,
  70. IsShowRowNumbers = true,
  71. IsSingleSelect = false
  72. })
  73. </div>
  74. </div>