List.cshtml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. Name = "CampusDropdown",
  11. ID = "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. Name = "CollegeDropdown",
  33. ID = "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. @section scripts{
  52. <script src="~/Scripts/Business/UniversityManage/ClassroomManage/Buildings.js" type="text/javascript"></script>
  53. <script type="text/javascript">
  54. var nonSelect = "@DropdownList.SELECT_ALL";
  55. </script>
  56. }
  57. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  58. @Html.Position()
  59. <div class="p_SearchTitle">
  60. <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">查询条件</div>
  61. </div>
  62. <form id="formQuery" method="post" action="@Url.Content("~/Buildings/Excel")">
  63. @Html.PositionCondition()
  64. <div class="search_keyword">
  65. <div class="search_input">
  66. <ul>
  67. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("Campus"):</li>
  68. <li class="sv">
  69. @Html.ComboGrid(cgopCampus, new Dictionary<string, string> { { "data-condition", "dgBuildingsList" } })
  70. </li>
  71. <li class="sn" style="padding-left: 5px;">建筑类型:</li>
  72. <li class="sv">
  73. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_BuildingsType, DropdownListBindType.SelectAll,
  74. new ComboGridOptions
  75. {
  76. ID = "DictionaryBuildingsType",
  77. Name = "DictionaryBuildingsType",
  78. OnSelect = "reload"
  79. }, new Dictionary<string, string> { { "data-condition", "dgBuildingsList" } })
  80. </li>
  81. <li class="sn" style="padding-left: 5px;color:red;">@EMIS.Utility.RSL.Get("College"):</li>
  82. <li class="sv">
  83. @Html.ComboGrid(cgopCollege, new Dictionary<string, string> { { "data-condition", "dgBuildingsList" } })
  84. </li>
  85. <li class="sn" style="padding-left: 5px;color:red;">是否可用:</li>
  86. <li class="sv">
  87. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions()
  88. {
  89. ID = "IsSpecialDropdown",
  90. Name = "IsSpecialDropdown",
  91. BindType = DropdownListBindType.SelectAll,
  92. OnSelect = "reload"
  93. }, new Dictionary<string, string> { { "data-condition", "dgBuildingsList" } })
  94. </li>
  95. </ul>
  96. </div>
  97. </div>
  98. </form>
  99. <div class="p_title">
  100. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">建筑信息列表</div>
  101. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  102. </div>
  103. @Html.PositionBatchModify()
  104. <div class="search_list">
  105. @Html.DataGrid(new DataGridOptions
  106. {
  107. Columns = new List<DataGridColumn>()
  108. {
  109. new CheckBoxFieldColumn{ HeaderText="", FieldName="BuildingsInfoID" },
  110. new LinkButtonColumn { FieldName="Code", HeaderText="建筑编号", Align=AlignStyle.Center, Handle="edit", Width=0.05 },
  111. new BoundFieldColumn { FieldName="Name", HeaderText="建筑名称", Align=AlignStyle.Center, Width=0.1 },
  112. new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("Campus"), Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  113. new BoundFieldColumn { FieldName="BuildingsTypeName", HeaderText="建筑类型", Align=AlignStyle.Center, OrderFieldName="BuildingsTypeID", Width=0.04 },
  114. new BoundFieldColumn { FieldName="BuildingsStatusName", HeaderText="建筑状况", Align=AlignStyle.Center, OrderFieldName="BuildingsStatusID", Width=0.04 },
  115. new BoundFieldColumn { FieldName="BuildingsLevel", HeaderText="建筑层数", Align=AlignStyle.Center, Width=0.04 },
  116. new BoundFieldColumn { FieldName="BuildingsArea", HeaderText="建筑面积", Align=AlignStyle.Center, Width=0.04 },
  117. new BoundFieldColumn { FieldName="UseArea", HeaderText="使用面积", Align=AlignStyle.Center, Width=0.04 },
  118. //new BoundFieldColumn { FieldName="CollegeCode", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.05 },
  119. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.08, OverflowLength=8, CustomFormatFun="SetRedColumn" },
  120. //new BoundFieldColumn { FieldName="CollegeCampusName", HeaderText=@EMIS.Utility.RSL.Get("Campus"), Align=AlignStyle.Center, Width=0.06, OverflowLength=6, CustomFormatFun="SetRedColumn" },
  121. new LinkButtonColumn { FieldName="ClassroomCount", HeaderText="教室间数", Align=AlignStyle.Center, Handle="editClassroomCount", Width=0.04 },
  122. new BoundFieldColumn { FieldName="IsSpecialName", HeaderText="是否可用", Align=AlignStyle.Center, OrderFieldName="IsSpecial", Width=0.04, CustomFormatFun="SetRedColumn" }
  123. },
  124. CustomerRowStyleFun = "SetRedGrid",
  125. IsCheckOnSelect = true,
  126. DataSourceUrl = Url.Content("~/Buildings/List"),
  127. ID = "dgBuildingsList",
  128. IsPagination = true,
  129. IsShowRowNumbers = true,
  130. IsSingleSelect = false
  131. })
  132. </div>
  133. </div>