PlanRangeList.cshtml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "PlanRangeList";
  5. Guid? executablePlanID = new Guid(Request["executablePlanID"]);
  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. $("#dgExecutablePlanRangeList").cmsXDataTable("load", $.getDataGridParams("dgExecutablePlanRangeList"));
  36. }
  37. //设置列颜色为红色
  38. function SetRedColumn(index, row, value) {
  39. return " <span style=\"color: red;\">" + value + "</span>";
  40. }
  41. //Excel导出
  42. function ExecutablePlanRange_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("~/ExecutablePlan/PlanRangeListExcel?executablePlanID=" + executablePlanID)">
  49. @Html.PositionCondition("ExecutablePlanRange")
  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", "dgExecutablePlanRangeList" } })
  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", "dgExecutablePlanRangeList" } })
  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("PlanRange")</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="ClassmajorID" },
  82. new BoundFieldColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center, Width=0.08 },
  83. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.12 },
  84. new BoundFieldColumn { FieldName="ClassNum", HeaderText="班序", Align=AlignStyle.Center, Width=0.02 },
  85. //new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
  86. new BoundFieldColumn { FieldName="SchoolyearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" },
  87. new BoundFieldColumn { FieldName="GraduatingSemesterCode", HeaderText="毕业学期", Align=AlignStyle.Center, Width=0.08 },
  88. //new BoundFieldColumn { FieldName="AssistantUserName", HeaderText="辅导员", Align=AlignStyle.Center, Width=0.04 },
  89. new BoundFieldColumn { FieldName="UserName", HeaderText="班主任", Align=AlignStyle.Center, Width=0.04 },
  90. new BoundFieldColumn { FieldName="StudentCount", HeaderText="人数", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" }
  91. },
  92. IsPostBack = true,
  93. IsCheckOnSelect = true,
  94. DataSourceUrl = Url.Content("~/ExecutablePlan/PlanRangeList?executablePlanID=" + executablePlanID),
  95. ID = "dgExecutablePlanRangeList",
  96. IsPagination = true,
  97. IsShowRowNumbers = true,
  98. IsSingleSelect = false
  99. })
  100. </div>
  101. </div>