Edit.cshtml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. @model EMIS.ViewModel.UniversityManage.AdministrativeOrgan.CampusView
  2. @using EMIS.Web.Controls;
  3. @using EMIS.Entities;
  4. @using Bowin.Web.Controls.Mvc;
  5. @{
  6. ViewBag.Title = "Edit";
  7. var isEnable = Request["type"] == "detail" ? false : true;
  8. //学校信息
  9. ComboGridOptions cgopUniversity = new ComboGridOptions
  10. {
  11. TextField = "Name",
  12. ValueField = "UniversityID",
  13. IsEnabled = isEnable,
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. new LinkButtonColumn { FieldName="Code", HeaderText="学校代码", Align=AlignStyle.Center ,Width=0.12},
  19. new BoundFieldColumn { FieldName="Name", HeaderText="学校名称", Align=AlignStyle.Center ,Width=0.3}
  20. },
  21. PageSize = 5,
  22. IsCheckOnSelect = true,
  23. DataSourceUrl = Url.Content("~/University/List"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false
  27. }
  28. };
  29. ComboGridOptions cgopGeneralsuper = new ComboGridOptions
  30. {
  31. TextField = "Name",
  32. ValueField = "UserID",
  33. IsEnabled = isEnable,
  34. GridOptions = new DataGridOptions
  35. {
  36. Columns = new List<DataGridColumn>()
  37. {
  38. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1},
  39. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1},
  40. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.3}
  41. },
  42. PageSize = 5,
  43. IsCheckOnSelect = true,
  44. DataSourceUrl = Url.Content("~/Staff/List"),
  45. IsPagination = true,
  46. IsShowRowNumbers = true,
  47. IsSingleSelect = false
  48. }
  49. };
  50. ComboGridOptions cgopRecruitstudents = new ComboGridOptions
  51. {
  52. TextField = "Name",
  53. ValueField = "UserID",
  54. IsEnabled = isEnable,
  55. GridOptions = new DataGridOptions
  56. {
  57. Columns = new List<DataGridColumn>()
  58. {
  59. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1},
  60. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1},
  61. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.3}
  62. },
  63. PageSize = 5,
  64. IsCheckOnSelect = true,
  65. DataSourceUrl = Url.Content("~/Staff/List"),
  66. IsPagination = true,
  67. IsShowRowNumbers = true,
  68. IsSingleSelect = false
  69. }
  70. };
  71. ComboGridOptions cgopPlacesuper = new ComboGridOptions
  72. {
  73. TextField = "Name",
  74. ValueField = "UserID",
  75. IsEnabled = isEnable,
  76. GridOptions = new DataGridOptions
  77. {
  78. Columns = new List<DataGridColumn>()
  79. {
  80. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1},
  81. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1},
  82. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.3}
  83. },
  84. PageSize = 5,
  85. IsCheckOnSelect = true,
  86. DataSourceUrl = Url.Content("~/Staff/List"),
  87. IsPagination = true,
  88. IsShowRowNumbers = true,
  89. IsSingleSelect = false
  90. }
  91. };
  92. ComboGridOptions cgopTeachingsuper = new ComboGridOptions
  93. {
  94. TextField = "Name",
  95. ValueField = "UserID",
  96. IsEnabled = isEnable,
  97. GridOptions = new DataGridOptions
  98. {
  99. Columns = new List<DataGridColumn>()
  100. {
  101. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1},
  102. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1},
  103. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.3}
  104. },
  105. PageSize = 5,
  106. IsCheckOnSelect = true,
  107. DataSourceUrl = Url.Content("~/Staff/List"),
  108. IsPagination = true,
  109. IsShowRowNumbers = true,
  110. IsSingleSelect = false
  111. }
  112. };
  113. ComboGridOptions cgopStudentcharge = new ComboGridOptions
  114. {
  115. TextField = "Name",
  116. ValueField = "UserID",
  117. IsEnabled = isEnable,
  118. GridOptions = new DataGridOptions
  119. {
  120. Columns = new List<DataGridColumn>()
  121. {
  122. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1},
  123. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1},
  124. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.3}
  125. },
  126. PageSize = 5,
  127. IsCheckOnSelect = true,
  128. DataSourceUrl = Url.Content("~/Staff/List"),
  129. IsPagination = true,
  130. IsShowRowNumbers = true,
  131. IsSingleSelect = false
  132. }
  133. };
  134. }
  135. @section scripts{
  136. <script src="~/Scripts/Business/UniversityManage/AdministrativeOrgan/CampusEdit.js" type="text/javascript"></script>
  137. <script type="text/javascript">
  138. </script>
  139. }
  140. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  141. @using (Ajax.BeginForm(new AjaxOptions
  142. {
  143. OnSuccess = "EMISFunction.FormSuccess",
  144. OnBegin = "EMISFunction.FormSubmit",
  145. OnComplete = "EMISFunction.FormComplete"
  146. }))
  147. {
  148. <div class="p_title">
  149. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  150. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  151. @if (Request["type"] != "detail")
  152. {
  153. @Html.ContextMenuBar("Edit")
  154. }
  155. </div>
  156. </div>
  157. <div class="search_list">
  158. @Html.HiddenFor(x => x.CampusID)
  159. <table cellpadding="0" cellspacing="0" id="Campustable">
  160. <tr>
  161. <td>
  162. @Html.LabelFor(x => x.No):
  163. </td>
  164. <td>
  165. @Html.TextBoxFor(x => x.No, new TextBoxOptions() { IsEnabled = isEnable })
  166. </td>
  167. <td>
  168. @Html.LabelFor(x => x.Name):
  169. </td>
  170. <td>
  171. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable })
  172. </td>
  173. </tr>
  174. <tr>
  175. <td>
  176. @Html.LabelFor(x => x.SimpleName):
  177. </td>
  178. <td>
  179. @Html.TextBoxFor(x => x.SimpleName, new TextBoxOptions() { IsEnabled = isEnable })
  180. </td>
  181. <td>
  182. @Html.LabelFor(x => x.EnglishName):
  183. </td>
  184. <td>
  185. @Html.TextBoxFor(x => x.EnglishName, new TextBoxOptions() { IsEnabled = isEnable })
  186. </td>
  187. </tr>
  188. <tr>
  189. <td>
  190. @Html.LabelFor(x => x.UniversityName):
  191. </td>
  192. <td>
  193. @Html.ComboGridFor(x => x.UniversityID, cgopUniversity)
  194. </td>
  195. <td>
  196. @Html.LabelFor(x => x.Studentcharge):
  197. </td>
  198. <td>
  199. @Html.ComboGridFor(x => x.Studentcharge, cgopStudentcharge)
  200. </td>
  201. </tr>
  202. <tr>
  203. <td>
  204. @Html.LabelFor(x => x.Generalsuper):
  205. </td>
  206. <td>
  207. @Html.ComboGridFor(x => x.Generalsuper, cgopGeneralsuper)
  208. </td>
  209. <td>
  210. @Html.LabelFor(x => x.Recruitstudents):
  211. </td>
  212. <td>
  213. @Html.ComboGridFor(x => x.Recruitstudents, cgopRecruitstudents)
  214. </td>
  215. </tr>
  216. <tr>
  217. <td>
  218. @Html.LabelFor(x => x.Placesuper):
  219. </td>
  220. <td>
  221. @Html.ComboGridFor(x => x.Placesuper, cgopPlacesuper)
  222. </td>
  223. <td>
  224. @Html.LabelFor(x => x.Teachingsuper):
  225. </td>
  226. <td>
  227. @Html.ComboGridFor(x => x.Teachingsuper, cgopTeachingsuper)
  228. </td>
  229. </tr>
  230. <tr>
  231. <td>
  232. @Html.LabelFor(x => x.ZIPCode):
  233. </td>
  234. <td>
  235. @Html.TextBoxFor(x => x.ZIPCode, new TextBoxOptions() { IsEnabled = isEnable })
  236. </td>
  237. <td>
  238. @Html.LabelFor(x => x.Officephone):
  239. </td>
  240. <td>
  241. @Html.TextBoxFor(x => x.Officephone, new TextBoxOptions() { IsEnabled = isEnable })
  242. </td>
  243. </tr>
  244. <tr>
  245. <td>
  246. @Html.LabelFor(x => x.FAX):
  247. </td>
  248. <td>
  249. @Html.TextBoxFor(x => x.FAX, new TextBoxOptions() { IsEnabled = isEnable })
  250. </td>
  251. <td>
  252. @Html.LabelFor(x => x.Email):
  253. </td>
  254. <td>
  255. @Html.TextBoxFor(x => x.Email, new TextBoxOptions() { IsEnabled = isEnable })
  256. </td>
  257. </tr>
  258. <tr>
  259. <td>
  260. @Html.LabelFor(x => x.Evolution):
  261. </td>
  262. <td colspan="3">
  263. @if (!isEnable)
  264. {
  265. @Html.TextAreaFor(x => x.Evolution, new Dictionary<string, object>
  266. {
  267. { "style", "width: 90%;min-height: 20px" },
  268. { "disabled", "true" }
  269. })
  270. }
  271. else
  272. {
  273. @Html.TextAreaFor(x => x.Evolution, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  274. }
  275. </td>
  276. </tr>
  277. <tr>
  278. <td>
  279. @Html.LabelFor(x => x.Remark):
  280. </td>
  281. <td colspan="3">
  282. @if (!isEnable)
  283. {
  284. @Html.TextAreaFor(x => x.Evolution, new Dictionary<string, object>
  285. {
  286. { "style", "width: 90%;min-height: 60px" },
  287. { "disabled", "true" }
  288. })
  289. }
  290. else
  291. {
  292. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 60px" } })
  293. }
  294. </td>
  295. </tr>
  296. </table>
  297. </div>
  298. }
  299. </div>