Edit.cshtml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. @model EMIS.ViewModel.ScoreManage.ExaminationScoreView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. List<ListControlItem> lct = ViewData["lct"] as List<ListControlItem>;
  7. ComboGridOptions cgopExaminationBatch = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "ExaminationBatchID",
  11. ID = "cgExaminationBatch",
  12. Name = "cgExaminationBatch",
  13. //OnSelect = "queryProject",
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. new BoundFieldColumn { FieldName="Name", HeaderText="考试批次", Align=AlignStyle.Center, Width = 0.3 }
  19. },
  20. IsCheckOnSelect = true,
  21. DataSourceUrl = Url.Content("~/ExaminationApplayStudentList/GetExaminationBatchViewGrid"),
  22. IsPagination = true,
  23. IsShowRowNumbers = true,
  24. IsSingleSelect = false,
  25. IsAutoLoad = false,
  26. }
  27. };
  28. ComboGridOptions cgopExaminationType = new ComboGridOptions
  29. {
  30. TextField = "Name",
  31. ValueField = "ExaminationTypeID",
  32. Width = 171,
  33. Name = "cgExaminationType",
  34. ID = "cgExaminationType",
  35. //OnSelect = "queryProject",
  36. GridOptions = new DataGridOptions
  37. {
  38. Columns = new List<DataGridColumn>()
  39. {
  40. new BoundFieldColumn { FieldName="Name", HeaderText="考试类型", Align=AlignStyle.Center, Width = 0.3 }
  41. },
  42. IsCheckOnSelect = true,
  43. DataSourceUrl = Url.Content("~/ExaminationType/List"),
  44. IsPagination = true,
  45. IsShowRowNumbers = true,
  46. IsSingleSelect = false,
  47. IsAutoLoad = false
  48. }
  49. };
  50. ComboGridOptions cgopExaminationProject = new ComboGridOptions
  51. {
  52. TextField = "Name",
  53. ValueField = "ExaminationProjectID",
  54. Name = "cgExaminationProject",
  55. ID = "cgExaminationProject",
  56. //OnSelect = "querySubject",
  57. GridOptions = new DataGridOptions
  58. {
  59. Columns = new List<DataGridColumn>()
  60. {
  61. new BoundFieldColumn { FieldName="Name", HeaderText="项目名称", Align=AlignStyle.Center, Width = 0.3 }
  62. },
  63. //OnLoadSuccessFun = "querySubject",
  64. IsCheckOnSelect = true,
  65. DataSourceUrl = Url.Content("~/ExaminationApplayStudentList/GetProjectListViewGrid"),
  66. IsPagination = true,
  67. IsShowRowNumbers = true,
  68. IsSingleSelect = false,
  69. IsAutoLoad = false
  70. }
  71. };
  72. ComboGridOptions cgopExaminationSubject = new ComboGridOptions
  73. {
  74. TextField = "ExaminationSubject",
  75. ValueField = "ExaminationSubjectID",
  76. Name = "cgExaminationSubject",
  77. ID = "cgExaminationSubject",
  78. Width = 171,
  79. //SelectedValue = Model.ExaminationSubjectID,
  80. GridOptions = new DataGridOptions
  81. {
  82. Columns = new List<DataGridColumn>()
  83. {
  84. new BoundFieldColumn { FieldName="ExaminationSubject", HeaderText="科目考核项", Align=AlignStyle.Center, Width = 0.3 }
  85. },
  86. IsCheckOnSelect = true,
  87. DataSourceUrl = Url.Content("~/ExaminationScore/GetSubjectViewByProjectID"),
  88. IsPagination = true,
  89. IsShowRowNumbers = true,
  90. IsSingleSelect = false,
  91. IsAutoLoad = false,
  92. }
  93. };
  94. //证件号
  95. ComboGridOptions cgopIDNumber = new ComboGridOptions
  96. {
  97. TextField = "IDNumber",
  98. ValueField = "UserID",
  99. OnSelect = "setUserName",
  100. Width = 171,
  101. GridOptions = new DataGridOptions
  102. {
  103. Columns = new List<DataGridColumn>()
  104. {
  105. new BoundFieldColumn { FieldName="IDNumber", HeaderText="证件号", Width=0.25, Align=AlignStyle.Center },
  106. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Width=0.1, Align=AlignStyle.Center }
  107. },
  108. IsCheckOnSelect = true,
  109. DataSourceUrl = Url.Content("~/Students/BaseStudentViewList"),
  110. IsPagination = true,
  111. IsShowRowNumbers = true,
  112. IsSingleSelect = false
  113. }
  114. };
  115. //学生信息
  116. ComboGridOptions cgopStudent = new ComboGridOptions
  117. {
  118. TextField = "UserName",
  119. ValueField = "UserID",
  120. IsEnabled = false,
  121. SelectedValue = Model.UserID,
  122. GridOptions = new DataGridOptions
  123. {
  124. Columns = new List<DataGridColumn>()
  125. {
  126. new BoundFieldColumn { FieldName="IDNumber", HeaderText="证件号", Width=0.25, Align=AlignStyle.Center },
  127. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Width=0.15, Align=AlignStyle.Center }
  128. },
  129. IsCheckOnSelect = true,
  130. DataSourceUrl = Url.Content("~/Students/BaseStudentViewList"),
  131. IsPagination = true,
  132. IsShowRowNumbers = true,
  133. IsSingleSelect = false
  134. }
  135. };
  136. }
  137. @section scripts{
  138. <script type="text/javascript">
  139. var nonSelect = "@DropdownList.SELECT_ALL";
  140. var subjectID = @Model.ExaminationSubjectID;
  141. </script>
  142. <script src="~/Scripts/Business/ScoreManage/ExaminationScoreEdit.js"></script>
  143. }
  144. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  145. @using (Ajax.BeginForm(new AjaxOptions
  146. {
  147. OnSuccess = "EMISFunction.FormSuccess",
  148. OnBegin = "EMISFunction.FormSubmit",
  149. OnComplete = "EMISFunction.FormComplete"
  150. }))
  151. {
  152. <div class="p_title">
  153. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  154. 项目成绩
  155. </div>
  156. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  157. </div>
  158. <div class="search_list">
  159. @Html.HiddenFor(x => x.ExaminationScoreID)
  160. <table cellpadding="0" cellspacing="0" id="educationMissionClasstable">
  161. <tr>
  162. <td>
  163. @Html.LabelFor(x => x.SchoolyearCode):
  164. </td>
  165. <td>
  166. @Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions
  167. {
  168. BindType = DropdownListBindType.PleaseSelect,
  169. ItemSourceUrl = Url.Content("~/SchoolYear/DropDown"),
  170. OnSelect = "schoolyearChange",
  171. SelectedValue = BaseExtensions.GetCurrentSchoolYearID(),
  172. OnLoadSuccess = "schoolyearChange",
  173. })
  174. @*<span style="color:red">*</span>*@
  175. </td>
  176. <td>
  177. @Html.LabelFor(x => x.ExaminationBatchName):
  178. </td>
  179. <td>
  180. @Html.DropdownListFor(x => x.ExaminationBatchID, new DropdownListOptions
  181. {
  182. BindType = DropdownListBindType.PleaseSelect,
  183. ItemSourceUrl = Url.Content("~/ExaminationBatch/DropDownList?schoolyearID=" + Model.SchoolyearID),
  184. OnSelect = "examinationBatchChange",
  185. OnLoadSuccess = "examinationBatchChange",
  186. })
  187. @*@Html.ComboGridFor(x => x.ExaminationBatchID, cgopExaminationBatch)*@
  188. @*<span style="color:red">*</span>*@
  189. </td>
  190. </tr>
  191. <tr>
  192. <td>
  193. @Html.LabelFor(x => x.ExaminationTypeName):
  194. </td>
  195. <td>
  196. @Html.DropdownListFor(x => x.ExaminationTypeID, new DropdownListOptions
  197. {
  198. BindType = DropdownListBindType.PleaseSelect,
  199. ItemSourceUrl = Url.Content("~/ExamBatchProject/TypeDropDownList?ExaminationBatchID=" + Model.ExaminationBatchID),
  200. OnSelect = "examinationTypeChange",
  201. OnLoadSuccess = "examinationTypeChange"
  202. })
  203. @*@Html.ComboGridFor(x => x.ExaminationTypeID, cgopExaminationType)*@
  204. @*<span style="color:red">*</span>*@
  205. </td>
  206. <td>
  207. @Html.LabelFor(x => x.ExaminationProjectName):
  208. </td>
  209. <td>
  210. @Html.DropdownListFor(x => x.ExaminationProjectID, new DropdownListOptions
  211. {
  212. BindType = DropdownListBindType.PleaseSelect,
  213. //OnChange = "querySubject",
  214. ItemSourceUrl = Url.Content("~/ExamBatchProject/DropDownList?ExaminationBatchID=" + Model.ExaminationBatchID + "&ExaminationTypeID=" + Model.ExaminationTypeID),
  215. OnSelect = "examinationProjectChange",
  216. OnLoadSuccess = "examinationProjectChange",
  217. })
  218. @*@Html.ComboGridFor(x => x.ExaminationProjectID, cgopExaminationProject)*@
  219. @*<span style="color:red">*</span>*@
  220. </td>
  221. </tr>
  222. <tr>
  223. <td>
  224. @Html.LabelFor(x => x.IDNumber):
  225. </td>
  226. <td>
  227. @Html.ComboGridFor(x => x.UserIDForIDNumber, cgopIDNumber)
  228. </td>
  229. <td>
  230. @Html.LabelFor(x => x.UserName):
  231. </td>
  232. <td>
  233. @Html.ComboGridFor(x => x.UserID, cgopStudent)
  234. </td>
  235. </tr>
  236. <tr>
  237. <td>
  238. @Html.LabelFor(x => x.ExaminationSubjectName):
  239. </td>
  240. <td>
  241. @Html.DropdownListFor(x => x.ExaminationSubjectID, new DropdownListOptions
  242. {
  243. BindType = DropdownListBindType.PleaseSelect,
  244. //OnChange = "querySubject",
  245. ItemSourceUrl = Url.Content("~/ExaminationScore/SubjectDropDownList?ExaminationProjectID=" + Model.ExaminationProjectID),
  246. //OnSelect = "examinationProjectChange",
  247. //OnLoadSuccess = "examinationProjectChange",
  248. })
  249. @*@Html.ComboGridFor(x => x.ExaminationSubjectID, cgopExaminationSubject)*@
  250. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EX_ExaminationSubject, x => x.ExaminationSubjectID)*@
  251. </td>
  252. <td>
  253. @Html.LabelFor(x => x.Score):
  254. </td>
  255. <td>
  256. @Html.TextBoxFor(x => x.Score)
  257. </td>
  258. </tr>
  259. <tr>
  260. <td>
  261. @Html.LabelFor(x => x.Expire):
  262. </td>
  263. <td colspan="3">
  264. @Html.TextBoxFor(x => x.Expire, new TextBoxOptions { TextBoxType = TextBoxType.Date })
  265. </td>
  266. </tr>
  267. <tr>
  268. <td>
  269. @Html.LabelFor(x => x.Remark):
  270. </td>
  271. <td colspan="3">
  272. @Html.TextAreaFor(x => x.Remark, new { style = "width: 98%;" })
  273. </td>
  274. </tr>
  275. </table>
  276. </div>
  277. }
  278. </div>