Edit.cshtml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. @model EMIS.ViewModel.UniversityManage.ClassroomManage.BuildingsInfoView
  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 cgopCampus = new ComboGridOptions
  9. {
  10. TextField = "Name",
  11. ValueField = "CampusID",
  12. IsEnabled = isEnable,
  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. PageSize = 5,
  21. IsCheckOnSelect = true,
  22. DataSourceUrl = Url.Content("~/Campus/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. @section scripts{
  53. <script src="~/Scripts/Business/UniversityManage/ClassroomManage/BuildingsEdit.js" type="text/javascript"></script>
  54. <script type="text/javascript">
  55. var nonSelect = "@DropdownList.SELECT_ALL";
  56. </script>
  57. }
  58. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  59. @using (Ajax.BeginForm(new AjaxOptions
  60. {
  61. OnSuccess = "EMISFunction.FormSuccess",
  62. OnBegin = "EMISFunction.FormSubmit",
  63. OnComplete = "EMISFunction.FormComplete"
  64. }))
  65. {
  66. <div class="p_title">
  67. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  68. </div>
  69. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  70. @if (Request["type"] != "detail")
  71. {
  72. @Html.ContextMenuBar("Edit")
  73. }
  74. </div>
  75. </div>
  76. <div class="search_list">
  77. @Html.HiddenFor(x => x.BuildingsInfoID)
  78. <table cellpadding="0" cellspacing="0" id="buildingstable">
  79. <tr>
  80. <td>
  81. @Html.LabelFor(x => x.Code):
  82. </td>
  83. <td>
  84. @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEnable })
  85. </td>
  86. <td>
  87. @Html.LabelFor(x => x.Name):
  88. </td>
  89. <td>
  90. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable })
  91. </td>
  92. </tr>
  93. <tr>
  94. <td>
  95. @Html.LabelFor(x => x.CampusID):
  96. </td>
  97. <td>
  98. @Html.ComboGridFor(x => x.CampusID, cgopCampus)
  99. </td>
  100. <td>
  101. @Html.LabelFor(x => x.BuildingsTypeID):
  102. </td>
  103. <td>
  104. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_BuildingsType, (x => x.BuildingsTypeID), new DropdownListOptions() { IsEnabled = isEnable })*@
  105. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_BuildingsType, x => x.BuildingsTypeID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  106. </td>
  107. </tr>
  108. <tr>
  109. <td>
  110. @Html.LabelFor(x => x.BuildingsStatusID):
  111. </td>
  112. <td>
  113. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_BuildingsStatus, (x => x.BuildingsStatusID), new DropdownListOptions() { IsEnabled = isEnable })*@
  114. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_BuildingsStatus, x => x.BuildingsStatusID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  115. </td>
  116. <td style="color:red;">
  117. @Html.LabelFor(x => x.CollegeID):
  118. </td>
  119. <td>
  120. @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
  121. </td>
  122. </tr>
  123. <tr>
  124. <td>
  125. @Html.LabelFor(x => x.BuildingsLevel):
  126. </td>
  127. <td>
  128. @Html.TextBoxFor(x => x.BuildingsLevel, new TextBoxOptions() { IsEnabled = isEnable })
  129. </td>
  130. <td>
  131. @Html.LabelFor(x => x.BuildingsArea):
  132. </td>
  133. <td>
  134. @Html.TextBoxFor(x => x.BuildingsArea, new TextBoxOptions() { IsEnabled = isEnable })
  135. </td>
  136. </tr>
  137. <tr>
  138. <td>
  139. @Html.LabelFor(x => x.UseArea):
  140. </td>
  141. <td>
  142. @Html.TextBoxFor(x => x.UseArea, new TextBoxOptions() { IsEnabled = isEnable })
  143. </td>
  144. <td style="color:red;">
  145. @Html.LabelFor(x => x.IsSpecial):
  146. </td>
  147. <td>
  148. @if (!isEnable)
  149. {
  150. @Html.CheckBoxFor(x => x.IsSpecial, new Dictionary<string, object>() { { "disabled", isEnable } })
  151. }
  152. else
  153. {
  154. @Html.CheckBoxFor(x => x.IsSpecial)
  155. }
  156. </td>
  157. </tr>
  158. <tr>
  159. <td>
  160. @Html.LabelFor(x => x.Position):
  161. </td>
  162. <td colspan="3">
  163. @if (!isEnable)
  164. {
  165. @Html.TextAreaFor(x => x.Position, new Dictionary<string, object>
  166. {
  167. { "style", "width: 90%;min-height: 20px" },
  168. { "disabled", "true" }
  169. })
  170. }
  171. else
  172. {
  173. @Html.TextAreaFor(x => x.Position, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  174. }
  175. </td>
  176. </tr>
  177. <tr>
  178. <td>
  179. @Html.LabelFor(x => x.Remark):
  180. </td>
  181. <td colspan="3">
  182. @if (!isEnable)
  183. {
  184. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  185. {
  186. { "style", "width: 90%;min-height: 60px" },
  187. { "disabled", "true" }
  188. })
  189. }
  190. else
  191. {
  192. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 60px" } })
  193. }
  194. </td>
  195. </tr>
  196. </table>
  197. </div>
  198. }
  199. </div>