DepartmentList.cshtml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "DepartmentList";
  5. Guid? collegeID = new Guid(Request["collegeID"]);
  6. }
  7. @section scripts{
  8. <script type="text/javascript">
  9. var nonSelect = "@DropdownList.SELECT_ALL";
  10. //刷新
  11. function reload() {
  12. $("#dgDepartmentList").cmsXDataTable("load", $.getDataGridParams("dgDepartmentList"));
  13. }
  14. //设置列颜色为红色
  15. function SetRedColumn(index, row, value) {
  16. return " <span style=\"color: red;\">" + value + "</span>";
  17. }
  18. //Excel导出
  19. function CollegeDepartment_DetailExport() {
  20. $("#formQuery").submit();
  21. }
  22. </script>
  23. }
  24. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  25. <form id="formQuery" method="post" action="@Url.Content("~/College/DepartmentListExcel?collegeID=" + collegeID)">
  26. @Html.PositionCondition("CollegeDepartment")
  27. <div class="search_keyword">
  28. @*<div class="search_input">
  29. <ul>
  30. </ul>
  31. </div>*@
  32. </div>
  33. <div class="p_title">
  34. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  35. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("DepDetail")</div>
  36. </div>
  37. </form>
  38. <div class="search_list">
  39. @Html.DataGrid(new DataGridOptions
  40. {
  41. Columns = new List<DataGridColumn>()
  42. {
  43. new CheckBoxFieldColumn{ HeaderText="", FieldName="DepartmentID" },
  44. new BoundFieldColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.05 },
  45. new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center, Width=0.1 },
  46. new BoundFieldColumn { FieldName="SimpleName", HeaderText="教研室简称", Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  47. new BoundFieldColumn { FieldName="DirectorName", HeaderText="主任姓名", Align=AlignStyle.Center, Width=0.05 },
  48. new BoundFieldColumn { FieldName="DeputyDirectorName", HeaderText="副主任姓名", Align=AlignStyle.Center, Width=0.05 },
  49. new BoundFieldColumn { FieldName="StaffCount", HeaderText="教师人数", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  50. new BoundFieldColumn { FieldName="CollegeCode", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.05 },
  51. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.1, OverflowLength=8 },
  52. new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.03, OverflowLength=6 }
  53. },
  54. IsPostBack = true,
  55. IsCheckOnSelect = true,
  56. DataSourceUrl = Url.Content("~/College/DepartmentList?collegeID=" + collegeID),
  57. ID = "dgDepartmentList",
  58. IsPagination = true,
  59. IsShowRowNumbers = true,
  60. IsSingleSelect = false
  61. })
  62. </div>
  63. </div>