Edit.cshtml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. @model EMIS.ViewModel.StudentManage.StudentChange.StudentChangeView
  2. @using Bowin.Web.Controls.Mvc;
  3. @using EMIS.Entities;
  4. @using EMIS.Web.Controls;
  5. @{
  6. ViewBag.Title = "Edit";
  7. var isEnable = Request["type"] == "detail" ? false : true;
  8. //学生信息
  9. ComboGridOptions cgopStudent = new ComboGridOptions
  10. {
  11. TextField = "StudentNo",
  12. ValueField = "UserID",
  13. OnSelect = "queryStudent",
  14. IsEnabled = isEnable,
  15. GridOptions = new DataGridOptions
  16. {
  17. Columns = new List<DataGridColumn>()
  18. {
  19. new LinkButtonColumn { FieldName="StudentNo", HeaderText="学号", Width=0.2, Align=AlignStyle.Center },
  20. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Width=0.08, Align=AlignStyle.Center },
  21. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Width=0.1, Align=AlignStyle.Center, OrderFieldName="StandardID", OverflowLength=6 },
  22. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Width=0.06, Align=AlignStyle.Center, OverflowLength=6 },
  23. //new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Width=0.1, Align=AlignStyle.Center, OverflowLength=6 },
  24. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Width=0.1, Align=AlignStyle.Center, OrderFieldName="InSchoolStatusID", CustomFormatFun="SetRedColumn" }
  25. //new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Width=0.1, Align=AlignStyle.Center, OrderFieldName="StudentStatus", CustomFormatFun="SetRedColumn" }
  26. },
  27. PageSize = 10,
  28. IsCheckOnSelect = true,
  29. DataSourceUrl = Url.Content("~/Student/StudentBaseInSchoolList?userID=" + Model.UserID),
  30. IsPagination = true,
  31. IsShowRowNumbers = true,
  32. IsSingleSelect = false
  33. }
  34. };
  35. //班级信息(异动前)
  36. ComboGridOptions cgopBeforeClassmajor = new ComboGridOptions
  37. {
  38. TextField = "Name",
  39. ValueField = "ClassmajorID",
  40. IsEnabled = false,
  41. GridOptions = new DataGridOptions
  42. {
  43. Columns = new List<DataGridColumn>()
  44. {
  45. new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Width=0.2, Align=AlignStyle.Center },
  46. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Width=0.3, Align=AlignStyle.Center }
  47. },
  48. PageSize = 5,
  49. IsCheckOnSelect = true,
  50. DataSourceUrl = Url.Content("~/Classmajor/List"),
  51. IsPagination = true,
  52. IsShowRowNumbers = true,
  53. IsSingleSelect = false
  54. }
  55. };
  56. //班级信息(异动后)
  57. ComboGridOptions cgopAfterClassmajor = new ComboGridOptions
  58. {
  59. TextField = "Name",
  60. ValueField = "ClassmajorID",
  61. OnSelect = "queryAfterClassmajor",
  62. IsEnabled = isEnable,
  63. GridOptions = new DataGridOptions
  64. {
  65. Columns = new List<DataGridColumn>()
  66. {
  67. new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Width=0.2, Align=AlignStyle.Center },
  68. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Width=0.3, Align=AlignStyle.Center }
  69. },
  70. PageSize = 5,
  71. IsCheckOnSelect = true,
  72. DataSourceUrl = Url.Content("~/Classmajor/List"),
  73. IsPagination = true,
  74. IsShowRowNumbers = true,
  75. IsSingleSelect = false
  76. }
  77. };
  78. //院系所(异动前)
  79. ComboGridOptions cgopBeforeCollege = new ComboGridOptions
  80. {
  81. TextField = "Name",
  82. ValueField = "CollegeID",
  83. IsEnabled = false,
  84. GridOptions = new DataGridOptions
  85. {
  86. Columns = new List<DataGridColumn>()
  87. {
  88. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  89. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.3 },
  90. new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.3 }
  91. },
  92. PageSize = 5,
  93. IsCheckOnSelect = true,
  94. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  95. IsPagination = true,
  96. IsShowRowNumbers = true,
  97. IsSingleSelect = false
  98. }
  99. };
  100. //院系所(异动后)
  101. ComboGridOptions cgopAfterCollege = new ComboGridOptions
  102. {
  103. TextField = "Name",
  104. ValueField = "CollegeID",
  105. OnSelect = "queryAfterCollege",
  106. IsEnabled = isEnable,
  107. GridOptions = new DataGridOptions
  108. {
  109. Columns = new List<DataGridColumn>()
  110. {
  111. new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  112. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.3 },
  113. new BoundFieldColumn { FieldName="CampusName", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.3 }
  114. },
  115. PageSize = 5,
  116. IsCheckOnSelect = true,
  117. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  118. IsPagination = true,
  119. IsShowRowNumbers = true,
  120. IsSingleSelect = false
  121. }
  122. };
  123. }
  124. @section scripts{
  125. <script src="~/Scripts/Business/StudentManage/StudentChange/ChangeResultEdit.js" type="text/javascript"></script>
  126. <script type="text/javascript">
  127. var nonSelect = "@DropdownList.SELECT_ALL";
  128. </script>
  129. }
  130. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  131. @using (Ajax.BeginForm(new AjaxOptions
  132. {
  133. OnSuccess = "EMISFunction.FormSuccess",
  134. OnBegin = "EMISFunction.FormSubmit",
  135. OnComplete = "EMISFunction.FormComplete"
  136. }))
  137. {
  138. <div class="p_title">
  139. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  140. </div>
  141. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  142. @if (Request["type"] != "detail")
  143. {
  144. @Html.ContextMenuBar("Edit")
  145. }
  146. </div>
  147. </div>
  148. <div class="search_list">
  149. @Html.HiddenFor(x => x.StudentChangeID)
  150. <table cellpadding="0" cellspacing="0" id="changeapplytable">
  151. <tr>
  152. <td style="color: red;">
  153. @Html.LabelFor(x => x.SchoolyearCode):
  154. </td>
  155. <td>
  156. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  157. {
  158. TextField = "Text",
  159. ValueField = "Value",
  160. BindType = DropdownListBindType.PleaseSelect,
  161. IsEnabled = false,
  162. SelectedValue = BaseExtensions.GetCurrentSchoolYearID(),
  163. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid")
  164. })
  165. </td>
  166. <td style="color: red;">
  167. @Html.LabelFor(x => x.ChangeTypeName):
  168. </td>
  169. <td>
  170. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_ChangeType, (x => x.ChangeTypeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  171. </td>
  172. </tr>
  173. <tr>
  174. <td style="color: red;">
  175. @Html.LabelFor(x => x.StudentNo):
  176. </td>
  177. <td>
  178. @Html.ComboGridFor(x => x.UserID, cgopStudent)
  179. </td>
  180. <td>
  181. @Html.LabelFor(x => x.Name):
  182. </td>
  183. <td>
  184. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = false })
  185. </td>
  186. </tr>
  187. <tr>
  188. <td>
  189. @Html.LabelFor(x => x.SexName):
  190. </td>
  191. <td>
  192. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Sex, (x => x.SexID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  193. </td>
  194. <td>
  195. @Html.LabelFor(x => x.ChangeReasonName):
  196. </td>
  197. <td>
  198. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_ChangeReason, (x => x.ChangeReasonID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  199. </td>
  200. </tr>
  201. <tr>
  202. <td>
  203. @Html.LabelFor(x => x.ChangeDate):
  204. </td>
  205. <td>
  206. @Html.TextBoxFor(x => x.ChangeDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
  207. </td>
  208. <td>
  209. @Html.LabelFor(x => x.ReturnSchoolyearCode):
  210. </td>
  211. <td>
  212. @Html.DropdownListFor((x => x.ReturnSchoolyearID), new DropdownListOptions
  213. {
  214. TextField = "Text",
  215. ValueField = "Value",
  216. BindType = DropdownListBindType.PleaseSelect,
  217. IsEnabled = isEnable,
  218. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid")
  219. })
  220. </td>
  221. </tr>
  222. <tr>
  223. <td colspan="4" style="padding:1px;height:10px;">
  224. <div id="beforeExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  225. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  226. onclick="swapBefore();">
  227. </div>
  228. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapBefore();">
  229. 异动前信息
  230. </div>
  231. </td>
  232. </tr>
  233. <tr>
  234. <td>
  235. @Html.LabelFor(x => x.BeforeCollegeName):
  236. </td>
  237. <td>
  238. @Html.ComboGridFor(x => x.BeforeCollegeID, cgopBeforeCollege)
  239. </td>
  240. <td>
  241. @Html.LabelFor(x => x.BeforeGradeName):
  242. </td>
  243. <td>
  244. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Grade, (x => x.BeforeGradeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  245. </td>
  246. </tr>
  247. <tr>
  248. <td>
  249. @Html.LabelFor(x => x.BeforeStandardName):
  250. </td>
  251. <td>
  252. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Standard, (x => x.BeforeStandardID), DropdownListBindType.PleaseSelect,
  253. new ComboGridOptions
  254. {
  255. IsEnabled = false,
  256. GridOptions = new DataGridOptions
  257. {
  258. Columns = new List<DataGridColumn>()
  259. {
  260. new BoundFieldColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  261. new BoundFieldColumn { FieldName="Name", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 }
  262. }
  263. }
  264. })
  265. </td>
  266. <td>
  267. @Html.LabelFor(x => x.BeforeStandardCode):
  268. </td>
  269. <td>
  270. @Html.TextBoxFor(x => x.BeforeStandardCode, new TextBoxOptions() { IsEnabled = false })
  271. </td>
  272. </tr>
  273. <tr>
  274. <td>
  275. @Html.LabelFor(x => x.BeforeEducationName):
  276. </td>
  277. <td>
  278. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, x => x.BeforeEducationID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  279. </td>
  280. <td>
  281. @Html.LabelFor(x => x.BeforeLearningformName):
  282. </td>
  283. <td>
  284. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, x => x.BeforeLearningformID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  285. </td>
  286. </tr>
  287. <tr>
  288. <td>
  289. @Html.LabelFor(x => x.BeforeLearnSystem):
  290. </td>
  291. <td>
  292. @Html.TextBoxFor(x => x.BeforeLearnSystem, new TextBoxOptions() { IsEnabled = false })
  293. </td>
  294. <td style="color: red;">
  295. @Html.LabelFor(x => x.BeforeClassmajorName):
  296. </td>
  297. <td>
  298. @Html.ComboGridFor(x => x.BeforeClassmajorID, cgopBeforeClassmajor)
  299. </td>
  300. </tr>
  301. <tr>
  302. <td style="color: red;">
  303. @Html.LabelFor(x => x.BeforeInSchoolStatusName):
  304. </td>
  305. <td>
  306. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.BeforeInSchoolStatusID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  307. </td>
  308. <td style="color: red;">
  309. @Html.LabelFor(x => x.BeforeStudentStatusName):
  310. </td>
  311. <td>
  312. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_StudentStatus, (x => x.BeforeStudentStatus), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  313. </td>
  314. </tr>
  315. <tr>
  316. <td colspan="4" style="padding:1px;height:10px;">
  317. <div id="afterExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  318. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  319. onclick="swapAfter();">
  320. </div>
  321. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapAfter();">
  322. 异动后信息
  323. </div>
  324. </td>
  325. </tr>
  326. <tr>
  327. <td>
  328. @Html.LabelFor(x => x.AfterCollegeName):
  329. </td>
  330. <td>
  331. @Html.ComboGridFor(x => x.AfterCollegeID, cgopAfterCollege)
  332. </td>
  333. <td>
  334. @Html.LabelFor(x => x.AfterGradeName):
  335. </td>
  336. <td>
  337. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Grade, (x => x.AfterGradeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  338. </td>
  339. </tr>
  340. <tr>
  341. <td>
  342. @Html.LabelFor(x => x.AfterStandardName):
  343. </td>
  344. <td>
  345. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Standard, (x => x.AfterStandardID), DropdownListBindType.PleaseSelect,
  346. new ComboGridOptions
  347. {
  348. IsEnabled = isEnable,
  349. OnSelect = "queryAfterStandard",
  350. GridOptions = new DataGridOptions
  351. {
  352. Columns = new List<DataGridColumn>()
  353. {
  354. new BoundFieldColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  355. new BoundFieldColumn { FieldName="Name", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 }
  356. }
  357. }
  358. })
  359. </td>
  360. <td>
  361. @Html.LabelFor(x => x.AfterStandardCode):
  362. </td>
  363. <td>
  364. @Html.TextBoxFor(x => x.AfterStandardCode, new TextBoxOptions() { IsEnabled = false })
  365. </td>
  366. </tr>
  367. <tr>
  368. <td>
  369. @Html.LabelFor(x => x.AfterEducationName):
  370. </td>
  371. <td>
  372. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, x => x.AfterEducationID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  373. </td>
  374. <td>
  375. @Html.LabelFor(x => x.AfterLearningformName):
  376. </td>
  377. <td>
  378. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, x => x.AfterLearningformID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  379. </td>
  380. </tr>
  381. <tr>
  382. <td>
  383. @Html.LabelFor(x => x.AfterLearnSystem):
  384. </td>
  385. <td>
  386. @Html.TextBoxFor(x => x.AfterLearnSystem, new TextBoxOptions() { IsEnabled = false })
  387. </td>
  388. <td style="color: red;">
  389. @Html.LabelFor(x => x.AfterClassmajorName):
  390. </td>
  391. <td>
  392. @Html.ComboGridFor(x => x.AfterClassmajorID, cgopAfterClassmajor)
  393. </td>
  394. </tr>
  395. <tr>
  396. <td style="color: red;">
  397. @Html.LabelFor(x => x.AfterInSchoolStatusName):
  398. </td>
  399. <td>
  400. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.AfterInSchoolStatusID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  401. </td>
  402. <td style="color: red;">
  403. @Html.LabelFor(x => x.AfterStudentStatusName):
  404. </td>
  405. <td>
  406. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_StudentStatus, (x => x.AfterStudentStatus), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  407. </td>
  408. </tr>
  409. <tr>
  410. <td>
  411. @Html.LabelFor(x => x.Description):
  412. </td>
  413. <td colspan="3">
  414. @if (!isEnable)
  415. {
  416. @Html.TextAreaFor(x => x.Description, new Dictionary<string, object>
  417. {
  418. { "style", "width: 85%;min-height: 35px" },
  419. { "disabled", "true" }
  420. })
  421. }
  422. else
  423. {
  424. @Html.TextAreaFor(x => x.Description, new Dictionary<string, object> { { "style", "width: 85%;min-height: 35px" } })
  425. }
  426. </td>
  427. </tr>
  428. <tr>
  429. <td>
  430. @Html.LabelFor(x => x.Remark):
  431. </td>
  432. <td colspan="3">
  433. @if (!isEnable)
  434. {
  435. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  436. {
  437. { "style", "width: 85%;min-height: 25px" },
  438. { "disabled", "true" }
  439. })
  440. }
  441. else
  442. {
  443. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 85%;min-height: 25px" } })
  444. }
  445. </td>
  446. </tr>
  447. </table>
  448. </div>
  449. }
  450. </div>