ClassStudentListView.cshtml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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"]);
  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 + "&DictionaryInschoolStatus=" + inschoolstatus)">
  27. @Html.PositionCondition("GrademajorStudent")
  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. @Html.DataGrid(new DataGridOptions
  35. {
  36. Columns = new List<DataGridColumn>()
  37. {
  38. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID" },
  39. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.08 },
  40. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  41. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, Width=0.02 },
  42. new BoundFieldColumn { FieldName="SchoolyearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" },
  43. //new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
  44. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1 },
  45. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  46. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, Width=0.04 }
  47. },
  48. IsPostBack = true,
  49. IsCheckOnSelect = true,
  50. DataSourceUrl = Url.Content("~/Grademajor/ClassStudentListView?grademajorID=" + grademajorID + "&DictionaryInschoolStatus=" + inschoolstatus),
  51. ID = "dgStudentList",
  52. IsPagination = true,
  53. IsShowRowNumbers = true,
  54. IsSingleSelect = false
  55. })
  56. </div>
  57. </div>