PlanStudentList.cshtml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "PlanStudentList";
  5. Guid? specialtyPlanID = new Guid(Request["specialtyPlanID"]);
  6. //班级信息
  7. ComboGridOptions cgopClassmajor = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "ClassmajorID",
  11. Name = "ClassmajorDropdown",
  12. ID = "ClassmajorDropdown",
  13. OnSelect = "reload",
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. //new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center, Width=0.2 },
  19. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.3 }
  20. },
  21. PageSize = 5,
  22. IsCheckOnSelect = true,
  23. DataSourceUrl = Url.Content("~/Classmajor/List"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false
  27. }
  28. };
  29. }
  30. @section scripts{
  31. <script type="text/javascript">
  32. var nonSelect = "@DropdownList.SELECT_ALL";
  33. //刷新
  34. function reload() {
  35. $("#dgSpecialtyPlanStudentList").cmsXDataTable("load", $.getDataGridParams("dgSpecialtyPlanStudentList"));
  36. }
  37. //设置列颜色为红色
  38. function SetRedColumn(index, row, value) {
  39. return " <span style=\"color: red;\">" + value + "</span>";
  40. }
  41. //Excel导出
  42. function SpecialtyPlanStudent_Export() {
  43. $("#formQuery").submit();
  44. }
  45. </script>
  46. }
  47. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  48. <form id="formQuery" method="post" action="@Url.Content("~/SpecialtyPlan/PlanStudentListExcel?specialtyPlanID=" + specialtyPlanID)">
  49. @Html.PositionCondition("SpecialtyPlanStudent")
  50. <div class="search_keyword">
  51. <div class="search_input">
  52. <ul>
  53. <li class="sn" style="padding-left: 5px;">班级名称:</li>
  54. <li class="sv">
  55. @Html.ComboGrid(cgopClassmajor, new Dictionary<string, string> { { "data-condition", "dgSpecialtyPlanStudentList" } })
  56. </li>
  57. <li class="sn" style="padding-left: 5px;color:red;">在校状态:</li>
  58. <li class="sv">
  59. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_INOrOutSchoolStatus, new DropdownListOptions
  60. {
  61. ID = "DictionaryInschoolStatus",
  62. Name = "DictionaryInschoolStatus",
  63. BindType = DropdownListBindType.SelectAll,
  64. //SelectedValue = (int)EMIS.ViewModel.CF_INOrOutSchoolStatus.Yes,
  65. OnSelect = "reload"
  66. }, new Dictionary<string, string> { { "data-condition", "dgSpecialtyPlanStudentList" } })
  67. </li>
  68. </ul>
  69. </div>
  70. </div>
  71. <div class="p_title">
  72. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  73. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("PlanStudent")</div>
  74. </div>
  75. </form>
  76. <div class="search_list">
  77. @Html.DataGrid(new DataGridOptions
  78. {
  79. Columns = new List<DataGridColumn>()
  80. {
  81. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID" },
  82. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.08 },
  83. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, Width=0.04 },
  84. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, OrderFieldName="Sex", Width=0.02 },
  85. new BoundFieldColumn { FieldName="SchoolyearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" },
  86. //new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
  87. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1 },
  88. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, OrderFieldName="InSchoolStatusID", Width=0.04, CustomFormatFun="SetRedColumn" },
  89. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, OrderFieldName="StudentStatus", Width=0.04 }
  90. },
  91. IsPostBack = true,
  92. IsCheckOnSelect = true,
  93. DataSourceUrl = Url.Content("~/SpecialtyPlan/PlanStudentList?specialtyPlanID=" + specialtyPlanID),
  94. ID = "dgSpecialtyPlanStudentList",
  95. IsPagination = true,
  96. IsShowRowNumbers = true,
  97. IsSingleSelect = false
  98. })
  99. </div>
  100. </div>