CollegeList.cshtml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "CollegeList";
  5. Guid? campusID = new Guid(Request["campusID"]);
  6. }
  7. @section scripts{
  8. <script type="text/javascript">
  9. var nonSelect = "@DropdownList.SELECT_ALL";
  10. //刷新
  11. function reload() {
  12. $("#dgCollegeList").cmsXDataTable("load", $.getDataGridParams("dgCollegeList"));
  13. }
  14. //设置列颜色为红色
  15. function SetRedColumn(index, row, value) {
  16. return " <span style=\"color: red;\">" + value + "</span>";
  17. }
  18. //Excel导出
  19. function CampusCollege_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("~/Campus/CollegeListExcel?campusID=" + campusID)">
  26. @Html.PositionCondition("CampusCollege")
  27. <div class="search_keyword">
  28. <div class="search_input">
  29. <ul>
  30. <li class="sn" style="padding-left: 5px;color:red;">单位类别:</li>
  31. <li class="sv">
  32. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_UnitCategory, DropdownListBindType.SelectAll,
  33. new ComboGridOptions
  34. {
  35. ID = "DictionaryUnitCategory",
  36. Name = "DictionaryUnitCategory",
  37. OnSelect = "reload"
  38. }, new Dictionary<string, string> { { "data-condition", "dgCollegeList" } })
  39. </li>
  40. </ul>
  41. </div>
  42. </div>
  43. <div class="p_title">
  44. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  45. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("ColDetail")</div>
  46. </div>
  47. </form>
  48. <div class="search_list">
  49. @Html.DataGrid(new DataGridOptions
  50. {
  51. Columns = new List<DataGridColumn>()
  52. {
  53. new CheckBoxFieldColumn{ HeaderText="", FieldName="CollegeID" },
  54. new BoundFieldColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.06 },
  55. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.12 },
  56. //new BoundFieldColumn { FieldName="SimpleName", HeaderText="简称", Align=AlignStyle.Center, Width=0.08, OverflowLength=6 },
  57. //new BoundFieldColumn { FieldName="PoliticalManagerName", HeaderText="党务负责人", Align=AlignStyle.Center, Width=0.05 },
  58. //new BoundFieldColumn { FieldName="AdministrativeManagerName", HeaderText="行政负责人", Align=AlignStyle.Center, Width=0.05 },
  59. new BoundFieldColumn { FieldName="UnitCategoryName", HeaderText="单位类别", Align=AlignStyle.Center, OrderFieldName="UnitCategoryID", Width=0.05 },
  60. //new BoundFieldColumn { FieldName="FoundDate", HeaderText="建立年月", Align=AlignStyle.Center, Width=0.08, Formatter = Formatter.OnlyYearMonthDay },
  61. new BoundFieldColumn { FieldName="Officephone", HeaderText="办公电话", Align=AlignStyle.Center, Width=0.08 },
  62. new BoundFieldColumn { FieldName="DepartmentCount", HeaderText="教研室数", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  63. new BoundFieldColumn { FieldName="StaffCount", HeaderText="教师人数", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  64. new BoundFieldColumn { FieldName="FacultymajorCount", HeaderText="院系专业数", Align=AlignStyle.Center, Width=0.05, CustomFormatFun="SetRedColumn" },
  65. //new BoundFieldColumn { FieldName="CampusNo", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center, Width=0.05 },
  66. new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.06, OverflowLength=6 }
  67. //new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.03, OverflowLength=6 }
  68. },
  69. IsPostBack = true,
  70. IsCheckOnSelect = true,
  71. DataSourceUrl = Url.Content("~/Campus/CollegeList?campusID=" + campusID),
  72. ID = "dgCollegeList",
  73. IsPagination = true,
  74. IsShowRowNumbers = true,
  75. IsSingleSelect = false
  76. })
  77. </div>
  78. </div>