Edit.cshtml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. @model EMIS.ViewModel.UniversityManage.AdministrativeOrgan.UniversityView
  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 cgopCity = new ComboGridOptions
  9. {
  10. TextField = "Name",
  11. ValueField = "Value",
  12. OnSelect = "queryCity",
  13. IsEnabled = isEnable,
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. new BoundFieldColumn { FieldName="Name", HeaderText="", Align=AlignStyle.Center }
  19. },
  20. PageSize = 5,
  21. IsShowHeader = false,
  22. IsCheckOnSelect = true,
  23. DataSourceUrl = Url.Content("~/DictionaryItem/CityComboGridList"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false
  27. }
  28. };
  29. //所属县、区
  30. ComboGridOptions cgopDistrict = new ComboGridOptions
  31. {
  32. TextField = "Name",
  33. ValueField = "Value",
  34. OnSelect = "queryDistrict",
  35. IsEnabled = isEnable,
  36. GridOptions = new DataGridOptions
  37. {
  38. Columns = new List<DataGridColumn>()
  39. {
  40. new BoundFieldColumn { FieldName="Name", HeaderText="", Align=AlignStyle.Center }
  41. },
  42. PageSize = 5,
  43. IsShowHeader = false,
  44. IsCheckOnSelect = true,
  45. DataSourceUrl = Url.Content("~/DictionaryItem/DistrictComboGridList"),
  46. IsPagination = true,
  47. IsShowRowNumbers = true,
  48. IsSingleSelect = false
  49. }
  50. };
  51. //教职工
  52. ComboGridOptions cgopStaff = new ComboGridOptions
  53. {
  54. TextField = "Name",
  55. ValueField = "UserID",
  56. IsEnabled = isEnable,
  57. GridOptions = new DataGridOptions
  58. {
  59. Columns = new List<DataGridColumn>()
  60. {
  61. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center ,Width=0.1},
  62. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1},
  63. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center ,Width=0.2}
  64. },
  65. PageSize = 5,
  66. IsCheckOnSelect = true,
  67. DataSourceUrl = Url.Content("~/Staff/List"),
  68. IsPagination = true,
  69. IsShowRowNumbers = true,
  70. IsSingleSelect = false
  71. }
  72. };
  73. }
  74. @section scripts{
  75. <script src="~/Scripts/Business/UniversityManage/AdministrativeOrgan/UniversityEdit.js" type="text/javascript"></script>
  76. <script type="text/javascript">
  77. var nonSelect = "@DropdownList.SELECT_ALL";
  78. </script>
  79. <style>
  80. .labelClass {
  81. width: 20%;
  82. }
  83. </style>
  84. }
  85. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  86. @using (Ajax.BeginForm(new AjaxOptions
  87. {
  88. OnSuccess = "EMISFunction.FormSuccess",
  89. OnBegin = "EMISFunction.FormSubmit",
  90. OnComplete = "EMISFunction.FormComplete"
  91. }))
  92. {
  93. <div class="p_title">
  94. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  95. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  96. @if (Request["type"] != "detail")
  97. {
  98. @Html.ContextMenuBar("Edit")
  99. }
  100. </div>
  101. </div>
  102. <div class="search_list">
  103. @Html.HiddenFor(x => x.UniversityID)
  104. <table cellpadding="0" cellspacing="0" id="universitytable">
  105. <tr>
  106. <td>
  107. @Html.LabelFor(x => x.Code):
  108. </td>
  109. <td>
  110. @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEnable })
  111. </td>
  112. <td>
  113. @Html.LabelFor(x => x.Name):
  114. </td>
  115. <td>
  116. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable })
  117. </td>
  118. </tr>
  119. <tr>
  120. <td>
  121. @Html.LabelFor(x => x.SimpleName):
  122. </td>
  123. <td>
  124. @Html.TextBoxFor(x => x.SimpleName, new TextBoxOptions() { IsEnabled = isEnable })
  125. </td>
  126. <td>
  127. @Html.LabelFor(x => x.EnglishName):
  128. </td>
  129. <td>
  130. @Html.TextBoxFor(x => x.EnglishName, new TextBoxOptions() { IsEnabled = isEnable })
  131. </td>
  132. </tr>
  133. <tr>
  134. <td>
  135. @Html.LabelFor(x => x.ProvinceName):
  136. </td>
  137. <td>
  138. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Province, (x => x.ProvinceID), DropdownListBindType.PleaseSelect,
  139. new ComboGridOptions
  140. {
  141. OnSelect = "queryProvince",
  142. IsEnabled = isEnable
  143. })
  144. </td>
  145. <td>
  146. @Html.LabelFor(x => x.CityName):
  147. </td>
  148. <td>
  149. @Html.ComboGridFor(x => x.CityID, cgopCity)
  150. </td>
  151. </tr>
  152. <tr>
  153. <td>
  154. @Html.LabelFor(x => x.DistrictName):
  155. </td>
  156. <td>
  157. @Html.ComboGridFor(x => x.DistrictID, cgopDistrict)
  158. </td>
  159. <td>
  160. @Html.LabelFor(x => x.PartyManageID):
  161. </td>
  162. <td>
  163. @Html.ComboGridFor(x => x.PartyManageID, cgopStaff)
  164. </td>
  165. </tr>
  166. <tr>
  167. <td colspan="4" style="padding:1px;height:10px;">
  168. <div id="profileExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  169. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  170. onclick="swapProfileSettings();">
  171. </div>
  172. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapProfileSettings();">
  173. 学校扩展信息
  174. </div>
  175. </td>
  176. </tr>
  177. <tr>
  178. <td>
  179. @Html.LabelFor(x => x.PropertyID):
  180. </td>
  181. <td>
  182. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_UniversityProperty, (x => x.PropertyID), new DropdownListOptions() { IsEnabled = isEnable })
  183. </td>
  184. <td>
  185. @Html.LabelFor(x => x.SchoolTypeID):
  186. </td>
  187. <td>
  188. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_SchoolType, (x => x.SchoolTypeID), new DropdownListOptions() { IsEnabled = isEnable })
  189. </td>
  190. </tr>
  191. <tr>
  192. <td>
  193. @Html.LabelFor(x => x.ManagerID):
  194. </td>
  195. <td>
  196. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ManagerType, (x => x.ManagerID), new DropdownListOptions() { IsEnabled = isEnable })
  197. </td>
  198. <td>
  199. @Html.LabelFor(x => x.FounderTypeID):
  200. </td>
  201. <td>
  202. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_FounderType, (x => x.FounderTypeID), new DropdownListOptions() { IsEnabled = isEnable })
  203. </td>
  204. </tr>
  205. <tr>
  206. <td>
  207. @Html.LabelFor(x => x.SchoolLevelID):
  208. </td>
  209. <td>
  210. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_SchoolLevel, (x => x.SchoolLevelID), new DropdownListOptions() { IsEnabled = isEnable })
  211. </td>
  212. <td>
  213. @Html.LabelFor(x => x.HeadMasterName):
  214. </td>
  215. <td>
  216. @Html.TextBoxFor(x => x.HeadMasterName, new TextBoxOptions() { IsEnabled = isEnable })
  217. </td>
  218. </tr>
  219. <tr>
  220. <td>
  221. @Html.LabelFor(x => x.BuildDate):
  222. </td>
  223. <td>
  224. @Html.TextBoxFor(x => x.BuildDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
  225. </td>
  226. <td>
  227. @Html.LabelFor(x => x.LegalPersonName):
  228. </td>
  229. <td>
  230. @Html.TextBoxFor(x => x.LegalPersonName, new TextBoxOptions() { IsEnabled = isEnable })
  231. </td>
  232. </tr>
  233. <tr>
  234. <td>
  235. @Html.LabelFor(x => x.AnniversaryDate):
  236. </td>
  237. <td>
  238. @Html.TextBoxFor(x => x.AnniversaryDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
  239. </td>
  240. <td>
  241. @Html.LabelFor(x => x.SchoolBasis):
  242. </td>
  243. <td>
  244. @Html.TextBoxFor(x => x.SchoolBasis, new TextBoxOptions() { IsEnabled = isEnable })
  245. </td>
  246. </tr>
  247. <tr>
  248. <td>
  249. @Html.LabelFor(x => x.SchoolMotto):
  250. </td>
  251. <td colspan="3">
  252. @if (!isEnable)
  253. {
  254. @Html.TextBoxFor(x => x.SchoolMotto, new Dictionary<string, object>
  255. {
  256. { "style", "width: 90%;min-height: 20px" },
  257. { "disabled", "true" }
  258. })
  259. }
  260. else
  261. {
  262. @Html.TextBoxFor(x => x.SchoolMotto, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  263. }
  264. </td>
  265. </tr>
  266. <tr>
  267. <td>
  268. @Html.LabelFor(x => x.SubjectCount):
  269. </td>
  270. <td>
  271. @Html.TextBoxFor(x => x.SubjectCount, new TextBoxOptions() { IsEnabled = isEnable })
  272. </td>
  273. <td>
  274. @Html.LabelFor(x => x.Is211University):
  275. </td>
  276. <td>
  277. @if (!isEnable)
  278. {
  279. @Html.CheckBoxFor(x => x.Is211University, new Dictionary<string, object>() { { "disabled", isEnable } })
  280. }
  281. else
  282. {
  283. @Html.CheckBoxFor(x => x.Is211University)
  284. }
  285. </td>
  286. </tr>
  287. <tr>
  288. <td>
  289. @Html.LabelFor(x => x.IsKeyUniversity):
  290. </td>
  291. <td>
  292. @if (!isEnable)
  293. {
  294. @Html.CheckBoxFor(x => x.IsKeyUniversity, new Dictionary<string, object>() { { "disabled", isEnable } })
  295. }
  296. else
  297. {
  298. @Html.CheckBoxFor(x => x.IsKeyUniversity)
  299. }
  300. </td>
  301. <td>
  302. @Html.LabelFor(x => x.IsAdultCollege):
  303. </td>
  304. <td>
  305. @if (!isEnable)
  306. {
  307. @Html.CheckBoxFor(x => x.IsAdultCollege, new Dictionary<string, object>() { { "disabled", isEnable } })
  308. }
  309. else
  310. {
  311. @Html.CheckBoxFor(x => x.IsAdultCollege)
  312. }
  313. </td>
  314. </tr>
  315. <tr>
  316. <td>
  317. @Html.LabelFor(x => x.IsPostCollege):
  318. </td>
  319. <td>
  320. @if (!isEnable)
  321. {
  322. @Html.CheckBoxFor(x => x.IsPostCollege, new Dictionary<string, object>() { { "disabled", isEnable } })
  323. }
  324. else
  325. {
  326. @Html.CheckBoxFor(x => x.IsPostCollege)
  327. }
  328. </td>
  329. <td>
  330. @Html.LabelFor(x => x.IsNetCollege):
  331. </td>
  332. <td>
  333. @if (!isEnable)
  334. {
  335. @Html.CheckBoxFor(x => x.IsNetCollege, new Dictionary<string, object>() { { "disabled", isEnable } })
  336. }
  337. else
  338. {
  339. @Html.CheckBoxFor(x => x.IsNetCollege)
  340. }
  341. </td>
  342. </tr>
  343. <tr>
  344. <td colspan="4" style="padding:1px;height:10px;">
  345. <div id="contactExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  346. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -50px 0;"
  347. onclick="swapContactSettings();">
  348. </div>
  349. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapContactSettings();">
  350. 学校联系信息
  351. </div>
  352. </td>
  353. </tr>
  354. <tr>
  355. <td>
  356. @Html.LabelFor(x => x.Telephone):
  357. </td>
  358. <td>
  359. @Html.TextBoxFor(x => x.Telephone, new TextBoxOptions() { IsEnabled = isEnable })
  360. </td>
  361. <td>
  362. @Html.LabelFor(x => x.ZIPCode):
  363. </td>
  364. <td>
  365. @Html.TextBoxFor(x => x.ZIPCode, new TextBoxOptions() { IsEnabled = isEnable })
  366. </td>
  367. </tr>
  368. <tr>
  369. <td>
  370. @Html.LabelFor(x => x.Email):
  371. </td>
  372. <td>
  373. @Html.TextBoxFor(x => x.Email, new TextBoxOptions() { IsEnabled = isEnable })
  374. </td>
  375. <td>
  376. @Html.LabelFor(x => x.FAX):
  377. </td>
  378. <td>
  379. @Html.TextBoxFor(x => x.FAX, new TextBoxOptions() { IsEnabled = isEnable })
  380. </td>
  381. </tr>
  382. <tr>
  383. <td>
  384. @Html.LabelFor(x => x.PublicNum):
  385. </td>
  386. <td>
  387. @Html.TextBoxFor(x => x.PublicNum, new TextBoxOptions() { IsEnabled = isEnable })
  388. </td>
  389. <td>
  390. @Html.LabelFor(x => x.HomePage):
  391. </td>
  392. <td>
  393. @Html.TextBoxFor(x => x.HomePage, new TextBoxOptions() { IsEnabled = isEnable })
  394. </td>
  395. </tr>
  396. <tr>
  397. <td>
  398. @Html.LabelFor(x => x.Address):
  399. </td>
  400. <td colspan="3">
  401. @if (!isEnable)
  402. {
  403. @Html.TextBoxFor(x => x.Address, new Dictionary<string, object>
  404. {
  405. { "style", "width: 90%;min-height: 20px" },
  406. { "disabled", "true" }
  407. })
  408. }
  409. else
  410. {
  411. @Html.TextBoxFor(x => x.Address, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  412. }
  413. </td>
  414. </tr>
  415. <tr>
  416. <td>
  417. @Html.LabelFor(x => x.EnglishAddress):
  418. </td>
  419. <td colspan="3">
  420. @if (!isEnable)
  421. {
  422. @Html.TextBoxFor(x => x.EnglishAddress, new Dictionary<string, object>
  423. {
  424. { "style", "width: 90%;min-height: 20px" },
  425. { "disabled", "true" }
  426. })
  427. }
  428. else
  429. {
  430. @Html.TextBoxFor(x => x.EnglishAddress, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  431. }
  432. </td>
  433. </tr>
  434. <tr>
  435. <td>
  436. @Html.LabelFor(x => x.HistoryEvolution):
  437. </td>
  438. <td colspan="3">
  439. @if (!isEnable)
  440. {
  441. @Html.TextAreaFor(x => x.HistoryEvolution, new Dictionary<string, object>
  442. {
  443. { "style", "width: 90%;min-height: 20px" },
  444. { "disabled", "true" }
  445. })
  446. }
  447. else
  448. {
  449. @Html.TextAreaFor(x => x.HistoryEvolution, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  450. }
  451. </td>
  452. </tr>
  453. <tr>
  454. <td>
  455. @Html.LabelFor(x => x.Remark):
  456. </td>
  457. <td colspan="3">
  458. @if (!isEnable)
  459. {
  460. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  461. {
  462. { "style", "width: 90%;min-height: 20px" },
  463. { "disabled", "true" }
  464. })
  465. }
  466. else
  467. {
  468. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  469. }
  470. </td>
  471. </tr>
  472. </table>
  473. </div>
  474. }
  475. </div>