List.cshtml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "List";
  5. //校区
  6. ComboGridOptions cgopCampus = new ComboGridOptions
  7. {
  8. TextField = "Name",
  9. ValueField = "CampusID",
  10. ID = "CampusDropdown",
  11. Name = "CampusDropdown",
  12. OnSelect = "queryCampus",
  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. DataSourceUrl = Url.Content("~/College/ListWithoutRange"),
  45. IsPagination = true,
  46. IsShowRowNumbers = true,
  47. IsSingleSelect = false,
  48. }
  49. };
  50. //建筑信息
  51. ComboGridOptions cgopBuildings = new ComboGridOptions
  52. {
  53. TextField = "Name",
  54. ValueField = "BuildingsInfoID",
  55. ID = "BuildingsDropdown",
  56. Name = "BuildingsDropdown",
  57. OnSelect = "reload",
  58. GridOptions = new DataGridOptions
  59. {
  60. Columns = new List<DataGridColumn>()
  61. {
  62. new LinkButtonColumn { FieldName="Code", HeaderText="建筑编号", Align=AlignStyle.Center, Width=0.1 },
  63. new BoundFieldColumn { FieldName="Name", HeaderText="建筑名称", Align=AlignStyle.Center, Width=0.1 }
  64. },
  65. IsCheckOnSelect = true,
  66. DataSourceUrl = Url.Content("~/Buildings/list"),
  67. IsPagination = true,
  68. IsShowRowNumbers = true,
  69. IsSingleSelect = false
  70. }
  71. };
  72. //教室信息
  73. ComboGridOptions cgopClassroomName = new ComboGridOptions
  74. {
  75. TextField = "Name",
  76. ValueField = "Name",
  77. ID = "ClassroomNameDropdown",
  78. Name = "ClassroomNameDropdown",
  79. OnSelect = "reload",
  80. GridOptions = new DataGridOptions
  81. {
  82. Columns = new List<DataGridColumn>()
  83. {
  84. //new LinkButtonColumn { FieldName="Code", HeaderText="教室编号", Align=AlignStyle.Center, Width=0.1 },
  85. new BoundFieldColumn { FieldName="Name", HeaderText="教室名称", Align=AlignStyle.Center, Width=0.1 }
  86. },
  87. IsCheckOnSelect = true,
  88. DataSourceUrl = Url.Content("~/Classroom/List"),
  89. IsPagination = true,
  90. IsShowRowNumbers = true,
  91. IsSingleSelect = false,
  92. }
  93. };
  94. }
  95. @section scripts{
  96. <script src="~/Scripts/Business/UniversityManage/ClassroomManage/Classroom.js" type="text/javascript"></script>
  97. <script type="text/javascript">
  98. var nonSelect = "@DropdownList.SELECT_ALL";
  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;">查询条件</div>
  105. </div>
  106. <form id="formQuery" method="post" action="@Url.Content("~/Classroom/Excel")">
  107. @Html.PositionCondition()
  108. <div class="search_keyword">
  109. <div class="search_input">
  110. <ul>
  111. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("Campus"):</li>
  112. <li class="sv">
  113. @Html.ComboGrid(cgopCampus, new Dictionary<string, string> { { "data-condition", "dgClassroomList" } })
  114. </li>
  115. <li class="sn" style="padding-left: 5px;">所在建筑:</li>
  116. <li class="sv">
  117. @Html.ComboGrid(cgopBuildings, new Dictionary<string, string> { { "data-condition", "dgClassroomList" } })
  118. </li>
  119. <li class="sn" style="padding-left: 5px;">教室名称:</li>
  120. <li class="sv">
  121. @Html.ComboGrid(cgopClassroomName, new Dictionary<string, string> { { "data-condition", "dgClassroomList" } })
  122. </li>
  123. <li class="sn" style="padding-left: 5px;">教室类型:</li>
  124. <li class="sv">
  125. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_ClassroomType, DropdownListBindType.SelectAll,
  126. new ComboGridOptions
  127. {
  128. ID = "ClassroomTypeDictionary",
  129. Name = "ClassroomTypeDictionary",
  130. OnSelect = "reload"
  131. }, new Dictionary<string, string> { { "data-condition", "dgClassroomList" } })
  132. </li>
  133. </ul>
  134. <ul>
  135. <li class="sn" style="padding-left: 5px;color:red;">@EMIS.Utility.RSL.Get("College"):</li>
  136. <li class="sv">
  137. @Html.ComboGrid(cgopCollege, new Dictionary<string, string> { { "data-condition", "dgClassroomList" } })
  138. </li>
  139. <li class="sn" style="padding-left: 5px;color:red;">多班教学:</li>
  140. <li class="sv">
  141. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions()
  142. {
  143. BindType = DropdownListBindType.SelectAll,
  144. ID = "IsConcurrentUseDropdown",
  145. Name = "IsConcurrentUseDropdown",
  146. OnSelect = "reload"
  147. }, new Dictionary<string, string> { { "data-condition", "dgClassroomList" } })
  148. </li>
  149. <li class="sn" style="padding-left: 5px;color:red;">是否预留:</li>
  150. <li class="sv">
  151. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions()
  152. {
  153. BindType = DropdownListBindType.SelectAll,
  154. ID = "IsReserveDropdown",
  155. Name = "IsReserveDropdown",
  156. OnSelect = "reload"
  157. }, new Dictionary<string, string> { { "data-condition", "dgClassroomList" } })
  158. </li>
  159. <li class="sn" style="padding-left: 5px;color:red;">是否可用:</li>
  160. <li class="sv">
  161. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions()
  162. {
  163. BindType = DropdownListBindType.SelectAll,
  164. ID = "IsAvailableDropdown",
  165. Name = "IsAvailableDropdown",
  166. OnSelect = "reload"
  167. }, new Dictionary<string, string> { { "data-condition", "dgClassroomList" } })
  168. </li>
  169. </ul>
  170. </div>
  171. </div>
  172. </form>
  173. <div class="p_title">
  174. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">教室信息列表</div>
  175. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  176. </div>
  177. @Html.PositionBatchModify()
  178. <div class="search_list">
  179. @Html.DataGrid(new DataGridOptions
  180. {
  181. Columns = new List<DataGridColumn>()
  182. {
  183. new CheckBoxFieldColumn{ HeaderText="", FieldName="ClassroomID" },
  184. new LinkButtonColumn { FieldName="Code", HeaderText="教室编号", Align=AlignStyle.Center, Handle="edit", Width=0.1 },
  185. new BoundFieldColumn { FieldName="Name", HeaderText="教室名称", Align=AlignStyle.Center, Width=0.1 },
  186. new BoundFieldColumn { FieldName="BuildingsInfoName", HeaderText="建筑名称", Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  187. new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("Campus"), Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  188. new BoundFieldColumn { FieldName="ClassroomTypeName", HeaderText="教室类型", Align=AlignStyle.Center, OrderFieldName="", Width=0.08, OverflowLength=10 },
  189. new BoundFieldColumn { FieldName="RoomUseName", HeaderText="房间用途", Align=AlignStyle.Center, OrderFieldName="RoomUseID", Width=0.05, OverflowLength=6 },
  190. //new BoundFieldColumn { FieldName="FloorLevel", HeaderText="所在楼层", Align=AlignStyle.Center, Width=0.04 },
  191. //new BoundFieldColumn { FieldName="RowCout", HeaderText="行数", Align=AlignStyle.Center, Width=0.02 },
  192. //new BoundFieldColumn { FieldName="ColumnCount", HeaderText="列数", Align=AlignStyle.Center, Width=0.02 },
  193. new BoundFieldColumn { FieldName="Totalseating", HeaderText="总座位数", Align=AlignStyle.Center, Width=0.04 },
  194. new BoundFieldColumn { FieldName="Effectiveseating", HeaderText="有效座位数", Align=AlignStyle.Center, Width=0.05 },
  195. new BoundFieldColumn { FieldName="Examinationseating", HeaderText="考试座位数", Align=AlignStyle.Center, Width=0.05 },
  196. //new BoundFieldColumn { FieldName="CollegeCode", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.05, CustomFormatFun="SetRedColumn" },
  197. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.06, OverflowLength=6, CustomFormatFun="SetRedColumn" },
  198. //new BoundFieldColumn { FieldName="CollegeCampusName", HeaderText=@EMIS.Utility.RSL.Get("Campus"), Align=AlignStyle.Center, Width=0.06, OverflowLength=6, CustomFormatFun="SetRedColumn" },
  199. new BoundFieldColumn { FieldName="IsConcurrentUseName", HeaderText="多班教学", Align=AlignStyle.Center, OrderFieldName="IsConcurrentUse", Width=0.04, CustomFormatFun="SetRedColumn" }, //可否多班教学
  200. new BoundFieldColumn { FieldName="IsReserveName", HeaderText="是否预留", Align=AlignStyle.Center, OrderFieldName="IsReserve", Width=0.04, CustomFormatFun="SetRedColumn" },
  201. new LinkButtonColumn { FieldName="ScheduleCollegeCount", HeaderText="排课院系", Align=AlignStyle.Center, Handle="editScheduleCollege", Width=0.04 },
  202. new BoundFieldColumn { FieldName="IsAvailableName", HeaderText="是否可用", Align=AlignStyle.Center, OrderFieldName="IsAvailable", Width=0.04, CustomFormatFun="SetRedColumn" }
  203. },
  204. CustomerRowStyleFun = "SetRedGrid",
  205. IsCheckOnSelect = true,
  206. DataSourceUrl = Url.Content("~/Classroom/List"),
  207. ID = "dgClassroomList",
  208. IsPagination = true,
  209. IsShowRowNumbers = true,
  210. IsSingleSelect = false
  211. })
  212. </div>
  213. </div>