Edit.cshtml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  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. IsEnabled = false,
  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 = config,
  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 = config,
  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/StudentWeb/Change/StudentChangeEdit.js"></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="studentchangetable">
  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>
  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 style="color: red;">
  189. @Html.LabelFor(x => x.ChangeReasonName):
  190. </td>
  191. <td>
  192. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_ChangeReason, (x => x.ChangeReasonID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  193. </td>
  194. <td style="color: red;">
  195. @Html.LabelFor(x => x.ChangeDate):
  196. </td>
  197. <td>
  198. @Html.TextBoxFor(x => x.ChangeDate, new TextBoxOptions() { TextBoxType = TextBoxType.Date, IsEnabled = isEnable })
  199. </td>
  200. </tr>
  201. <tr>
  202. <td colspan="4" style="padding:1px;height:10px;">
  203. <div id="beforeExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  204. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  205. onclick="swapBefore();">
  206. </div>
  207. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapBefore();">
  208. 异动前信息
  209. </div>
  210. </td>
  211. </tr>
  212. <tr>
  213. <td>
  214. @Html.LabelFor(x => x.BeforeCollegeName):
  215. </td>
  216. <td>
  217. @Html.ComboGridFor(x => x.BeforeCollegeID, cgopBeforeCollege)
  218. </td>
  219. <td>
  220. @Html.LabelFor(x => x.BeforeGradeName):
  221. </td>
  222. <td>
  223. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Grade, (x => x.BeforeGradeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  224. </td>
  225. </tr>
  226. <tr>
  227. <td>
  228. @Html.LabelFor(x => x.BeforeStandardName):
  229. </td>
  230. <td>
  231. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Standard, (x => x.BeforeStandardID), DropdownListBindType.PleaseSelect,
  232. new ComboGridOptions
  233. {
  234. IsEnabled = false,
  235. GridOptions = new DataGridOptions
  236. {
  237. Columns = new List<DataGridColumn>()
  238. {
  239. new BoundFieldColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  240. new BoundFieldColumn { FieldName="Name", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 }
  241. }
  242. }
  243. })
  244. </td>
  245. <td>
  246. @Html.LabelFor(x => x.BeforeStandardCode):
  247. </td>
  248. <td>
  249. @Html.TextBoxFor(x => x.BeforeStandardCode, new TextBoxOptions() { IsEnabled = false })
  250. </td>
  251. </tr>
  252. <tr>
  253. <td>
  254. @Html.LabelFor(x => x.BeforeEducationName):
  255. </td>
  256. <td>
  257. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, x => x.BeforeEducationID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  258. </td>
  259. <td>
  260. @Html.LabelFor(x => x.BeforeLearningformName):
  261. </td>
  262. <td>
  263. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, x => x.BeforeLearningformID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  264. </td>
  265. </tr>
  266. <tr>
  267. <td>
  268. @Html.LabelFor(x => x.BeforeLearnSystem):
  269. </td>
  270. <td>
  271. @Html.TextBoxFor(x => x.BeforeLearnSystem, new TextBoxOptions() { IsEnabled = false })
  272. </td>
  273. <td style="color: red;">
  274. @Html.LabelFor(x => x.BeforeClassmajorName):
  275. </td>
  276. <td>
  277. @Html.ComboGridFor(x => x.BeforeClassmajorID, cgopBeforeClassmajor)
  278. </td>
  279. </tr>
  280. <tr>
  281. <td style="color: red;">
  282. @Html.LabelFor(x => x.BeforeInSchoolStatusName):
  283. </td>
  284. <td>
  285. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.BeforeInSchoolStatusID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  286. </td>
  287. <td style="color: red;">
  288. @Html.LabelFor(x => x.BeforeStudentStatusName):
  289. </td>
  290. <td>
  291. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_StudentStatus, (x => x.BeforeStudentStatus), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  292. </td>
  293. </tr>
  294. <tr>
  295. <td colspan="4" style="padding:1px;height:10px;">
  296. <div id="afterExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  297. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  298. onclick="swapAfter();">
  299. </div>
  300. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapAfter();">
  301. 异动后信息
  302. </div>
  303. </td>
  304. </tr>
  305. <tr>
  306. <td>
  307. @Html.LabelFor(x => x.AfterCollegeName):
  308. </td>
  309. <td>
  310. @Html.ComboGridFor(x => x.AfterCollegeID, cgopAfterCollege)
  311. </td>
  312. <td>
  313. @Html.LabelFor(x => x.AfterGradeName):
  314. </td>
  315. <td>
  316. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Grade, (x => x.AfterGradeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = config })
  317. </td>
  318. </tr>
  319. <tr>
  320. <td>
  321. @Html.LabelFor(x => x.AfterStandardName):
  322. </td>
  323. <td>
  324. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Standard, (x => x.AfterStandardID), DropdownListBindType.PleaseSelect,
  325. new ComboGridOptions
  326. {
  327. IsEnabled = config,
  328. OnSelect = "queryAfterStandard",
  329. GridOptions = new DataGridOptions
  330. {
  331. Columns = new List<DataGridColumn>()
  332. {
  333. new BoundFieldColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  334. new BoundFieldColumn { FieldName="Name", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 }
  335. }
  336. }
  337. })
  338. </td>
  339. <td>
  340. @Html.LabelFor(x => x.AfterStandardCode):
  341. </td>
  342. <td>
  343. @Html.TextBoxFor(x => x.AfterStandardCode, new TextBoxOptions() { IsEnabled = config })
  344. </td>
  345. </tr>
  346. <tr>
  347. <td>
  348. @Html.LabelFor(x => x.AfterEducationName):
  349. </td>
  350. <td>
  351. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Education, x => x.AfterEducationID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = config })
  352. </td>
  353. <td>
  354. @Html.LabelFor(x => x.AfterLearningformName):
  355. </td>
  356. <td>
  357. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, x => x.AfterLearningformID, DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = config })
  358. </td>
  359. </tr>
  360. <tr>
  361. <td>
  362. @Html.LabelFor(x => x.AfterLearnSystem):
  363. </td>
  364. <td>
  365. @Html.TextBoxFor(x => x.AfterLearnSystem, new TextBoxOptions() { IsEnabled = config })
  366. </td>
  367. <td style="color: red;">
  368. @Html.LabelFor(x => x.AfterClassmajorName):
  369. </td>
  370. <td>
  371. @Html.ComboGridFor(x => x.AfterClassmajorID, cgopAfterClassmajor)
  372. </td>
  373. </tr>
  374. <tr>
  375. <td style="color: red;">
  376. @Html.LabelFor(x => x.AfterInSchoolStatusName):
  377. </td>
  378. <td>
  379. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_InschoolStatus, (x => x.AfterInSchoolStatusID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = config })
  380. </td>
  381. <td style="color: red;">
  382. @Html.LabelFor(x => x.AfterStudentStatusName):
  383. </td>
  384. <td>
  385. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_StudentStatus, (x => x.AfterStudentStatus), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = config })
  386. </td>
  387. </tr>
  388. <tr>
  389. <td>
  390. @Html.LabelFor(x => x.Description):
  391. </td>
  392. <td colspan="3">
  393. @if (!isEnable)
  394. {
  395. @Html.TextAreaFor(x => x.Description, new Dictionary<string, object>
  396. {
  397. { "style", "width: 85%;min-height: 35px" },
  398. { "disabled", "true" }
  399. })
  400. }
  401. else
  402. {
  403. @Html.TextAreaFor(x => x.Description, new Dictionary<string, object> { { "style", "width: 85%;min-height: 35px" } })
  404. }
  405. </td>
  406. </tr>
  407. <tr>
  408. <td>
  409. @Html.LabelFor(x => x.Remark):
  410. </td>
  411. <td colspan="3">
  412. @if (!isEnable)
  413. {
  414. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  415. {
  416. { "style", "width: 85%;min-height: 25px" },
  417. { "disabled", "true" }
  418. })
  419. }
  420. else
  421. {
  422. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 85%;min-height: 25px" } })
  423. }
  424. </td>
  425. </tr>
  426. </table>
  427. </div>
  428. }
  429. </div>