List.cshtml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "List";
  5. //校区
  6. ComboGridOptions cgopCollegeCampus = new ComboGridOptions
  7. {
  8. TextField = "Name",
  9. ValueField = "CampusID",
  10. ID = "CollegeCampusDropdown",
  11. Name = "CollegeCampusDropdown",
  12. OnSelect = "queryCollegeCampus",
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center, Width=0.1 },
  18. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.12 }
  19. },
  20. IsCheckOnSelect = true,
  21. DataSourceUrl = Url.Content("~/Campus/List"),
  22. IsPagination = true,
  23. IsShowRowNumbers = true,
  24. IsSingleSelect = false,
  25. }
  26. };
  27. //院系所
  28. ComboGridOptions cgopCollege = new ComboGridOptions
  29. {
  30. TextField = "Name",
  31. ValueField = "CollegeID",
  32. ID = "CollegeDropdown",
  33. Name = "CollegeDropdown",
  34. OnSelect = "reload",
  35. GridOptions = new DataGridOptions
  36. {
  37. Columns = new List<DataGridColumn>()
  38. {
  39. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  40. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 }
  41. },
  42. IsCheckOnSelect = true,
  43. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  44. IsPagination = true,
  45. IsShowRowNumbers = true,
  46. IsSingleSelect = false,
  47. }
  48. };
  49. //建筑信息
  50. ComboGridOptions cgopBuildings = new ComboGridOptions
  51. {
  52. TextField = "Name",
  53. ValueField = "BuildingsInfoID",
  54. ID = "BuildingsDropdown",
  55. Name = "BuildingsDropdown",
  56. OnSelect = "reload",
  57. GridOptions = new DataGridOptions
  58. {
  59. Columns = new List<DataGridColumn>()
  60. {
  61. new LinkButtonColumn { FieldName="Code", HeaderText="建筑编号", Align=AlignStyle.Center, Width=0.1 },
  62. new BoundFieldColumn { FieldName="Name", HeaderText="建筑名称", Align=AlignStyle.Center, Width=0.1 }
  63. },
  64. IsCheckOnSelect = true,
  65. DataSourceUrl = Url.Content("~/Buildings/list"),
  66. IsPagination = true,
  67. IsShowRowNumbers = true,
  68. IsSingleSelect = false
  69. }
  70. };
  71. //教室信息
  72. ComboGridOptions cgopClassroomName = new ComboGridOptions
  73. {
  74. TextField = "Name",
  75. ValueField = "Name",
  76. ID = "ClassroomNameDropdown",
  77. Name = "ClassroomNameDropdown",
  78. OnSelect = "reload",
  79. GridOptions = new DataGridOptions
  80. {
  81. Columns = new List<DataGridColumn>()
  82. {
  83. //new LinkButtonColumn { FieldName="Code", HeaderText="教室编号", Align=AlignStyle.Center, Width=0.1 },
  84. new BoundFieldColumn { FieldName="Name", HeaderText="教室名称", Align=AlignStyle.Center, Width=0.1 }
  85. },
  86. IsCheckOnSelect = true,
  87. DataSourceUrl = Url.Content("~/Classroom/List"),
  88. IsPagination = true,
  89. IsShowRowNumbers = true,
  90. IsSingleSelect = false,
  91. }
  92. };
  93. }
  94. @section scripts{
  95. <script src="~/Scripts/Business/SchedulingManage/SchedulingSettings/CollegeClassroom.js" type="text/javascript"></script>
  96. <script type="text/javascript">
  97. var nonSelect = "@DropdownList.SELECT_ALL";
  98. var college = '@EMIS.Utility.RSL.Get("College")';
  99. </script>
  100. }
  101. <div class="easyui-panel" data-options="border:false,fit:true" style="position:relative;">
  102. @Html.Position()
  103. <div class="p_SearchTitle">
  104. <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
  105. 查询条件</div>
  106. </div>
  107. <form id="formQuery" method="post" action="@Url.Content("~/CollegeClassroom/Excel")">
  108. @Html.PositionCondition()
  109. <div class="search_keyword">
  110. <div class="search_input">
  111. <ul>
  112. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("Campus"):</li>
  113. <li class="sv">
  114. @Html.ComboGrid(cgopCollegeCampus, new Dictionary<string, string> { { "data-condition", "dgCollegeClassroomList" } })
  115. </li>
  116. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("College"):</li>
  117. <li class="sv">
  118. @Html.ComboGrid(cgopCollege, new Dictionary<string, string> { { "data-condition", "dgCollegeClassroomList" } })
  119. </li>
  120. <li class="sn" style="padding-left: 5px;">所在建筑:</li>
  121. <li class="sv">
  122. @Html.ComboGrid(cgopBuildings, new Dictionary<string, string> { { "data-condition", "dgCollegeClassroomList" } })
  123. </li>
  124. <li class="sn" style="padding-left: 5px;">教室名称:</li>
  125. <li class="sv">
  126. @Html.ComboGrid(cgopClassroomName, new Dictionary<string, string> { { "data-condition", "dgCollegeClassroomList" } })
  127. </li>
  128. </ul>
  129. <ul>
  130. <li class="sn" style="padding-left: 5px;">教室类型:</li>
  131. <li class="sv">
  132. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_ClassroomType, DropdownListBindType.SelectAll,
  133. new ComboGridOptions
  134. {
  135. ID = "ClassroomTypeDictionary",
  136. Name = "ClassroomTypeDictionary",
  137. OnSelect = "reload"
  138. },
  139. new Dictionary<string, string> { { "data-condition", "dgCollegeClassroomList" } })
  140. </li>
  141. <li class="sn" style="padding-left: 5px;color:red;">多班教学:</li>
  142. <li class="sv">
  143. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions()
  144. {
  145. BindType = DropdownListBindType.SelectAll,
  146. ID = "IsConcurrentUseDropdown",
  147. Name = "IsConcurrentUseDropdown",
  148. OnSelect = "reload"
  149. }, new Dictionary<string, string> { { "data-condition", "dgCollegeClassroomList" } })
  150. </li>
  151. <li class="sn" style="padding-left: 5px;color:red;">是否预留:</li>
  152. <li class="sv">
  153. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions()
  154. {
  155. BindType = DropdownListBindType.SelectAll,
  156. ID = "IsReserveDropdown",
  157. Name = "IsReserveDropdown",
  158. OnSelect = "reload"
  159. }, new Dictionary<string, string> { { "data-condition", "dgCollegeClassroomList" } })
  160. </li>
  161. <li class="sn" style="padding-left: 5px;color:red;">是否可用:</li>
  162. <li class="sv">
  163. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions()
  164. {
  165. BindType = DropdownListBindType.SelectAll,
  166. ID = "IsAvailableDropdown",
  167. Name = "IsAvailableDropdown",
  168. OnSelect = "reload"
  169. }, new Dictionary<string, string> { { "data-condition", "dgCollegeClassroomList" } })
  170. </li>
  171. @*<li class="sn" style="padding-left: 20px;"><a href="javascript:void(0)" class="easyui-linkbutton"
  172. data-options="iconCls:'icon-search'" onclick="reload();">查询</a>
  173. </li>*@
  174. </ul>
  175. </div>
  176. </div>
  177. </form>
  178. <div class="p_title">
  179. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  180. 院系教室列表</div>
  181. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  182. </div>
  183. @*@Html.PositionBatchModify()*@
  184. <div class="search_list">
  185. @Html.DataGrid(new DataGridOptions
  186. {
  187. Columns = new List<DataGridColumn>()
  188. {
  189. new CheckBoxFieldColumn{ HeaderText="", FieldName="CollegeClassroomID" },
  190. new BoundFieldColumn { FieldName="CollegeNo", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.06 },
  191. new LinkButtonColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Handle="edit", Width=0.1 },
  192. //new BoundFieldColumn { FieldName="UnitCategoryName", HeaderText="单位类别", Align=AlignStyle.Center, OrderFieldName="UnitCategoryID", Width=0.05 },
  193. //new BoundFieldColumn { FieldName="CollegeCampusName", HeaderText=@EMIS.Utility.RSL.Get("Campus"), Align=AlignStyle.Center, Width=0.04, OverflowLength=4 },
  194. new BoundFieldColumn { FieldName="ClassroomCode", HeaderText="教室编号", Align=AlignStyle.Center, Width=0.06 },
  195. new BoundFieldColumn { FieldName="ClassroomName", HeaderText="教室名称", Align=AlignStyle.Center, Width=0.1 },
  196. new BoundFieldColumn { FieldName="ClassroomTypeName", HeaderText="教室类型", Align=AlignStyle.Center, OrderFieldName="", Width=0.08, OverflowLength=8 },
  197. new BoundFieldColumn { FieldName="RoomUseName", HeaderText="房间用途", Align=AlignStyle.Center, OrderFieldName="RoomUseID", Width=0.05, OverflowLength=5 },
  198. new BoundFieldColumn { FieldName="Totalseating", HeaderText="总座位数", Align=AlignStyle.Center, Width=0.04 },
  199. new BoundFieldColumn { FieldName="Effectiveseating", HeaderText="有效座位数", Align=AlignStyle.Center, Width=0.05 },
  200. //new BoundFieldColumn { FieldName="ClassroomCollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  201. new BoundFieldColumn { FieldName="BuildingsInfoName", HeaderText="建筑名称", Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  202. //new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("Campus"), Align=AlignStyle.Center, Width=0.04, OverflowLength=4 },
  203. new BoundFieldColumn { FieldName="IsConcurrentUseName", HeaderText="多班教学", Align=AlignStyle.Center, OrderFieldName="IsConcurrentUse", Width=0.04 },
  204. new BoundFieldColumn { FieldName="IsReserveName", HeaderText="是否预留", Align=AlignStyle.Center, OrderFieldName="IsReserve", Width=0.04 },
  205. new BoundFieldColumn { FieldName="IsAvailableName", HeaderText="是否可用", Align=AlignStyle.Center, OrderFieldName="IsAvailable", Width=0.04, CustomFormatFun="SetRedColumn" }
  206. },
  207. CustomerRowStyleFun = "SetRedGrid",
  208. IsCheckOnSelect = true,
  209. DataSourceUrl = Url.Content("~/CollegeClassroom/List"),
  210. ID = "dgCollegeClassroomList",
  211. IsPagination = true,
  212. IsShowRowNumbers = true,
  213. IsSingleSelect = false
  214. })
  215. </div>
  216. </div>