Edit.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. @model EMIS.ViewModel.UniversityManage.ClassroomManage.ClassroomView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isEnable = Request["type"] == "detail" ? false : true;
  7. //建筑信息
  8. ComboGridOptions cgopBuildings = new ComboGridOptions
  9. {
  10. TextField = "Name",
  11. ValueField = "BuildingsInfoID",
  12. IsEnabled = isEnable,
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. new LinkButtonColumn { FieldName="Code", HeaderText="建筑代码", Align=AlignStyle.Center, Width=0.1 },
  18. new BoundFieldColumn { FieldName="Name", HeaderText="建筑名称", Align=AlignStyle.Center, Width=0.2 },
  19. new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.3 }
  20. },
  21. IsCheckOnSelect = true,
  22. DataSourceUrl = Url.Content("~/Buildings/List"),
  23. IsPagination = true,
  24. IsShowRowNumbers = true,
  25. IsSingleSelect = false
  26. }
  27. };
  28. //院系所
  29. ComboGridOptions cgopCollege = new ComboGridOptions
  30. {
  31. TextField = "Name",
  32. ValueField = "CollegeID",
  33. IsEnabled = isEnable,
  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.3 },
  40. new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.3 }
  41. },
  42. PageSize = 5,
  43. IsCheckOnSelect = true,
  44. //DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  45. DataSourceUrl = Url.Content("~/College/ListWithoutRange"),
  46. IsPagination = true,
  47. IsShowRowNumbers = true,
  48. IsSingleSelect = false
  49. }
  50. };
  51. //教室类型
  52. ListControlOptions lcopClassroomType = new ListControlOptions
  53. {
  54. TextField = "Name",
  55. ValueField = "Value",
  56. ID = "ClassroomTypeIDList",
  57. Name = "ClassroomTypeIDList",
  58. IsEnabled = isEnable,
  59. ColumnCount = 4,
  60. SelectedValueUrl = @Url.Content("~/Classroom/GetClassroomModeType?classroomID=" + Model.ClassroomID)
  61. };
  62. }
  63. @section scripts{
  64. <script src="~/Scripts/Business/UniversityManage/ClassroomManage/ClassroomEidt.js" type="text/javascript"></script>
  65. <script type="text/javascript">
  66. var nonSelect = "@DropdownList.SELECT_ALL";
  67. </script>
  68. }
  69. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  70. @using (Ajax.BeginForm(new AjaxOptions
  71. {
  72. OnSuccess = "EMISFunction.FormSuccess",
  73. OnBegin = "EMISFunction.FormSubmit",
  74. OnComplete = "EMISFunction.FormComplete"
  75. }))
  76. {
  77. <div class="p_title">
  78. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  79. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  80. @if (Request["type"] != "detail")
  81. {
  82. @Html.ContextMenuBar("Edit")
  83. }
  84. </div>
  85. </div>
  86. <div class="search_list">
  87. @Html.HiddenFor(x => x.ClassroomID)
  88. <table cellpadding="0" cellspacing="0" id="buildingstable">
  89. <tr>
  90. <td>
  91. @Html.LabelFor(x => x.Code):
  92. </td>
  93. <td>
  94. @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEnable })
  95. </td>
  96. <td>
  97. @Html.LabelFor(x => x.Name):
  98. </td>
  99. <td>
  100. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable })
  101. </td>
  102. </tr>
  103. <tr>
  104. <td>
  105. @Html.LabelFor(x => x.BuildingsInfoID):
  106. </td>
  107. <td>
  108. @Html.ComboGridFor(x => x.BuildingsInfoID, cgopBuildings)
  109. </td>
  110. <td style="color:red;">
  111. @Html.LabelFor(x => x.CollegeID):
  112. </td>
  113. <td>
  114. @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
  115. </td>
  116. </tr>
  117. <tr>
  118. <td>
  119. @Html.LabelFor(x => x.RoomUseID):
  120. </td>
  121. <td>
  122. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_RoomUse, (x => x.RoomUseID), new DropdownListOptions() { IsEnabled = isEnable })*@
  123. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_RoomUse, x => x.RoomUseID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  124. </td>
  125. <td>
  126. @Html.LabelFor(x => x.FloorLevel):
  127. </td>
  128. <td>
  129. @Html.TextBoxFor(x => x.FloorLevel, new TextBoxOptions() { IsEnabled = isEnable })
  130. </td>
  131. </tr>
  132. <tr>
  133. <td>
  134. @Html.LabelFor(x => x.RowCout):
  135. </td>
  136. <td>
  137. @Html.TextBoxFor(x => x.RowCout, new TextBoxOptions() { IsEnabled = isEnable })
  138. </td>
  139. <td>
  140. @Html.LabelFor(x => x.ColumnCount):
  141. </td>
  142. <td>
  143. @Html.TextBoxFor(x => x.ColumnCount, new TextBoxOptions() { IsEnabled = isEnable })
  144. </td>
  145. </tr>
  146. <tr>
  147. <td>
  148. @Html.LabelFor(x => x.Totalseating):
  149. </td>
  150. <td>
  151. @Html.TextBoxFor(x => x.Totalseating, new TextBoxOptions() { IsEnabled = isEnable })
  152. </td>
  153. <td>
  154. @Html.LabelFor(x => x.Acreage):
  155. </td>
  156. <td>
  157. @Html.TextBoxFor(x => x.Acreage, new TextBoxOptions() { IsEnabled = isEnable })
  158. </td>
  159. </tr>
  160. <tr>
  161. <td>
  162. @Html.LabelFor(x => x.Effectiveseating):
  163. </td>
  164. <td>
  165. @Html.TextBoxFor(x => x.Effectiveseating, new TextBoxOptions() { IsEnabled = isEnable })
  166. </td>
  167. <td>
  168. @Html.LabelFor(x => x.Examinationseating):
  169. </td>
  170. <td>
  171. @Html.TextBoxFor(x => x.Examinationseating, new TextBoxOptions() { IsEnabled = isEnable })
  172. </td>
  173. </tr>
  174. <tr>
  175. <td>
  176. @Html.LabelFor(x => x.IsWrittenExam):
  177. </td>
  178. <td>
  179. @if (!isEnable)
  180. {
  181. @Html.CheckBoxFor(x => x.IsWrittenExam, new Dictionary<string, object>() { { "disabled", isEnable } })
  182. }
  183. else
  184. {
  185. @Html.CheckBoxFor(x => x.IsWrittenExam)
  186. }
  187. </td>
  188. <td>
  189. @Html.LabelFor(x => x.IsMachinetest):
  190. </td>
  191. <td>
  192. @if (!isEnable)
  193. {
  194. @Html.CheckBoxFor(x => x.IsMachinetest, new Dictionary<string, object>() { { "disabled", isEnable } })
  195. }
  196. else
  197. {
  198. @Html.CheckBoxFor(x => x.IsMachinetest)
  199. }
  200. </td>
  201. </tr>
  202. <tr>
  203. <td style="color:red;">
  204. @Html.LabelFor(x => x.IsConcurrentUse):
  205. </td>
  206. <td>
  207. @if (!isEnable)
  208. {
  209. @Html.CheckBoxFor(x => x.IsConcurrentUse, new Dictionary<string, object>() { { "disabled", isEnable } })
  210. }
  211. else
  212. {
  213. @Html.CheckBoxFor(x => x.IsConcurrentUse)
  214. }
  215. </td>
  216. <td style="color:red;">
  217. @Html.LabelFor(x => x.IsAvailable):
  218. </td>
  219. <td>
  220. @if (!isEnable)
  221. {
  222. @Html.CheckBoxFor(x => x.IsAvailable, new Dictionary<string, object>() { { "disabled", isEnable } })
  223. }
  224. else
  225. {
  226. @Html.CheckBoxFor(x => x.IsAvailable)
  227. }
  228. </td>
  229. </tr>
  230. <tr>
  231. <td style="color:red;">
  232. @Html.LabelFor(x => x.ClassroomTypeIDList):
  233. </td>
  234. <td colspan="3">
  235. @Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.CF_ClassroomType, lcopClassroomType)
  236. </td>
  237. </tr>
  238. <tr>
  239. <td>
  240. @Html.LabelFor(x => x.Remark):
  241. </td>
  242. <td colspan="3">
  243. @if (!isEnable)
  244. {
  245. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  246. {
  247. { "style", "width: 90%;min-height: 60px" },
  248. { "disabled", "true" }
  249. })
  250. }
  251. else
  252. {
  253. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 60px" } })
  254. }
  255. </td>
  256. </tr>
  257. </table>
  258. </div>
  259. }
  260. </div>