ClassStudentListView.cshtml 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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"] == 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 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)">
  27. @Html.PositionCondition("ClassmajorStudent")
  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. <table cellpadding="0" cellspacing="0" id="classmajortable">
  52. <tr>
  53. <td>
  54. @Html.DataGrid(new DataGridOptions
  55. {
  56. Columns = new List<DataGridColumn>()
  57. {
  58. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID" },
  59. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.08 },
  60. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  61. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, OrderFieldName="SexID", Width=0.02 },
  62. new BoundFieldColumn { FieldName="GradeID", HeaderText="年级", Align=AlignStyle.Center, OrderFieldName="GradeID", Width=0.03, CustomFormatFun="SetRedColumn" },
  63. //new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
  64. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1 },
  65. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, OrderFieldName="InSchoolStatusID", Width=0.04, CustomFormatFun="SetRedColumn" },
  66. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, OrderFieldName="StudentStatus", Width=0.04 }
  67. },
  68. IsPostBack = true,
  69. IsCheckOnSelect = true,
  70. DataSourceUrl = Url.Content("~/Classmajor/ClassStudentListView?classmajorID=" + classmajorID),
  71. ID = "dgStudentList",
  72. IsPagination = true,
  73. IsShowRowNumbers = true,
  74. IsSingleSelect = false
  75. })
  76. </td>
  77. </tr>
  78. </table>
  79. </div>
  80. </div>