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