DepartmentSelector.cshtml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "DepartmentSelector";
  5. ComboGridOptions cgopCampus = new ComboGridOptions
  6. {
  7. TextField = "Name",
  8. ValueField = "CampusID",
  9. Name = "CampusDropdown",
  10. ID = "CampusDropdown",
  11. OnSelect = "QueryCampusComboGridList",
  12. GridOptions = new DataGridOptions
  13. {
  14. Columns = new List<DataGridColumn>()
  15. {
  16. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center, Width=0.1 },
  17. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.12 }
  18. },
  19. IsCheckOnSelect = true,
  20. DataSourceUrl = Url.Content("~/Campus/List"),
  21. IsPagination = true,
  22. IsShowRowNumbers = true,
  23. IsSingleSelect = false
  24. }
  25. };
  26. //院系所
  27. ComboGridOptions cgopCollege = new ComboGridOptions
  28. {
  29. TextField = "Name",
  30. ValueField = "CollegeID",
  31. OnSelect = "reload",
  32. Name = "CollegeDropdown",
  33. ID = "CollegeDropdown",
  34. GridOptions = new DataGridOptions
  35. {
  36. Columns = new List<DataGridColumn>()
  37. {
  38. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  39. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 }
  40. },
  41. IsCheckOnSelect = true,
  42. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  43. IsPagination = true,
  44. IsShowRowNumbers = true,
  45. IsSingleSelect = false,
  46. }
  47. };
  48. }
  49. @section scripts{
  50. <script src="~/Scripts/Business/Common/DepartmentSelector.js" type="text/javascript"></script>
  51. <script type="text/javascript">
  52. var nonSelect = "@DropdownList.SELECT_ALL";
  53. </script>
  54. }
  55. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  56. <div class="p_title">
  57. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  58. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  59. <div class="current_navbar toolbar">
  60. <div class="func_info">
  61. <a class="easyui-linkbutton" href="javascript:Department_Confirm()" data-options="iconCls:'icon-ok',plain:'true'"
  62. onfocus="this.blur()">选中</a>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. <form id="formQuery" method="post">
  68. <div class="search_keyword">
  69. <div class="search_input">
  70. <ul>
  71. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("Campus"):</li>
  72. <li class="sv">
  73. @Html.ComboGrid(cgopCampus, new Dictionary<string, string> { { "data-condition", "dgDepartmentList" } })
  74. </li>
  75. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("College"):</li>
  76. <li class="sv">
  77. @Html.ComboGrid(cgopCollege, new Dictionary<string, string> { { "data-condition", "dgDepartmentList" } })
  78. </li>
  79. </ul>
  80. </div>
  81. </div>
  82. </form>
  83. <div class="search_list">
  84. @Html.DataGrid(new DataGridOptions
  85. {
  86. Columns = new List<DataGridColumn>()
  87. {
  88. new CheckBoxFieldColumn{ HeaderText="", FieldName="DepartmentID" },
  89. new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center , Handle="edit", Width=0.05 },
  90. new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center, Width=0.1 },
  91. new BoundFieldColumn { FieldName="SimpleName", HeaderText="教研室简称", Align=AlignStyle.Center, Width=0.1 },
  92. new BoundFieldColumn { FieldName="DirectorName", HeaderText="主任姓名", Align=AlignStyle.Center, Width=0.05 },
  93. new BoundFieldColumn { FieldName="DeputyDirectorName", HeaderText="副主任姓名", Align=AlignStyle.Center, Width=0.05 },
  94. new BoundFieldColumn { FieldName="CollegeCode", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.05 },
  95. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.1 },
  96. new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.03, OverflowLength=6 }
  97. },
  98. IsCheckOnSelect = true,
  99. DataSourceUrl = Url.Content("~/Department/List"),
  100. ID = "dgDepartmentList",
  101. IsPagination = true,
  102. IsShowRowNumbers = true,
  103. IsSingleSelect = false
  104. })
  105. </div>
  106. </div>