Edit.cshtml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. @model EMIS.ViewModel.ScoreManage.FinalExaminationView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var OnSuccess = "EMISFunction.FormSuccessNoClose";
  7. ComboGridOptions cgopdepartment = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "DepartmentID",
  11. GridOptions = new DataGridOptions
  12. {
  13. Columns = new List<DataGridColumn>()
  14. {
  15. //new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.1 },
  16. new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center, Width=0.3 }
  17. },
  18. IsCheckOnSelect = true,
  19. DataSourceUrl = Url.Content("~/Department/ListGridResultSet"),
  20. IsPagination = true,
  21. IsShowRowNumbers = true,
  22. IsSingleSelect = false
  23. }
  24. };
  25. ComboGridOptions cgopcollege = new ComboGridOptions
  26. {
  27. TextField = "Name",
  28. ValueField = "CollegeID",
  29. //OnSelect = " QueryCollegeComboGridList",
  30. GridOptions = new DataGridOptions
  31. {
  32. Columns = new List<DataGridColumn>()
  33. {
  34. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  35. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.3 }
  36. },
  37. IsCheckOnSelect = true,
  38. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  39. IsPagination = true,
  40. IsShowRowNumbers = true,
  41. IsSingleSelect = false
  42. }
  43. };
  44. ComboGridOptions cgopClassmajor = new ComboGridOptions
  45. {
  46. TextField = "Name",
  47. ValueField = "ClassmajorID",
  48. OnSelect = "QueryComboGridClassmajor",
  49. GridOptions = new DataGridOptions
  50. {
  51. Columns = new List<DataGridColumn>()
  52. {
  53. new BoundFieldColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center, Width=0.1 },
  54. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.3 }
  55. },
  56. IsCheckOnSelect = true,
  57. DataSourceUrl = Url.Content("~/Classmajor/List"),
  58. IsPagination = true,
  59. IsShowRowNumbers = true,
  60. IsSingleSelect = false
  61. }
  62. };
  63. ComboGridOptions cgopEnableCourse = new ComboGridOptions
  64. {
  65. TextField = "CourseName",
  66. ValueField = "CoursematerialID",
  67. OnSelect = "QueryComboGridCourse",
  68. GridOptions = new DataGridOptions
  69. {
  70. Columns = new List<DataGridColumn>()
  71. {
  72. new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.1 },
  73. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.3 }
  74. },
  75. IsCheckOnSelect = true,
  76. DataSourceUrl = Url.Content("~/Coursematerial/GetIsEnableCoursematerialView"),
  77. IsPagination = true,
  78. IsShowRowNumbers = true,
  79. IsSingleSelect = false
  80. }
  81. };
  82. ComboGridOptions cgopEnableAndUseCourse = new ComboGridOptions
  83. {
  84. TextField = "CourseName",
  85. ValueField = "CoursematerialID",
  86. OnSelect = "QueryComboGridCourse",
  87. GridOptions = new DataGridOptions
  88. {
  89. Columns = new List<DataGridColumn>()
  90. {
  91. new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.1 },
  92. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.3 }
  93. },
  94. IsCheckOnSelect = true,
  95. DataSourceUrl = Url.Content("~/Coursematerial/GetEnableAndUseCoursematerialView?coursematerialID=" + Model.CoursematerialID),
  96. IsPagination = true,
  97. IsShowRowNumbers = true,
  98. IsSingleSelect = false
  99. }
  100. };
  101. ComboGridOptions cgopUser = new ComboGridOptions
  102. {
  103. TextField = "Name",
  104. ValueField = "UserID",
  105. GridOptions = new DataGridOptions
  106. {
  107. Columns = new List<DataGridColumn>()
  108. {
  109. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center, Width=0.1 },
  110. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.12 }
  111. },
  112. IsCheckOnSelect = true,
  113. DataSourceUrl = Url.Content("~/Staff/GetAllStaffDataBind"),
  114. IsPagination = true,
  115. IsShowRowNumbers = true,
  116. IsSingleSelect = false
  117. }
  118. };
  119. ComboGridOptions cgopStandard = new ComboGridOptions
  120. {
  121. TextField = "StandardName",
  122. ValueField = "StandardID",
  123. GridOptions = new DataGridOptions
  124. {
  125. Columns = new List<DataGridColumn>()
  126. {
  127. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.1 }
  128. },
  129. IsCheckOnSelect = true,
  130. DataSourceUrl = Url.Content("~/Grademajor/StandardBindComboGridOptions"),
  131. IsPagination = true,
  132. IsShowRowNumbers = true,
  133. IsSingleSelect = false,
  134. IsShowHeader = false
  135. }
  136. };
  137. }
  138. <style type="text/css">
  139. #FinalExaminationtable
  140. {
  141. width: 100%;
  142. border: 0px none;
  143. }
  144. #FinalExaminationtable tr
  145. {
  146. min-height: 30px;
  147. }
  148. </style>
  149. @section scripts{
  150. <script src="~/Scripts/Business/ScoreManage/ResitExaminationEdit.js" type="text/javascript"></script>
  151. <script type="text/javascript">
  152. var nonSelect = "@DropdownList.SELECT_ALL";
  153. function LoginIDColor(index, row, value) {
  154. if (row.IsDifferentDynamic == true) {
  155. return " <span style=\"color:red;\">" + value + "</span>";
  156. }
  157. else {
  158. return value
  159. }
  160. }
  161. function UserNameColor(index, row, value) {
  162. if (row.IsDifferentDynamic == true) {
  163. return " <span style=\"color:red;\">" + value + "</span>";
  164. }
  165. else {
  166. return value
  167. }
  168. }
  169. function SexNameColor(index, row, value) {
  170. if (row.IsDifferentDynamic == true) {
  171. return " <span style=\"color:red;\">" + value + "</span>";
  172. }
  173. else {
  174. return value
  175. }
  176. }
  177. function StudentStatusNameColor(index, row, value) {
  178. if (row.IsDifferentDynamic == true) {
  179. return " <span style=\"color:red;\">" + value + "</span>";
  180. }
  181. else {
  182. return value
  183. }
  184. }
  185. function InSchoolStatusNameColor(index, row, value) {
  186. if (row.IsDifferentDynamic == true) {
  187. return " <span style=\"color:red;\">" + value + "</span>";
  188. }
  189. else {
  190. return value
  191. }
  192. }
  193. function CoursematerialNameColor(index, row, value) {
  194. if (row.IsDifferentDynamic == true) {
  195. return " <span style=\"color:red;\">" + value + "</span>";
  196. }
  197. else {
  198. return value
  199. }
  200. }
  201. function ClassmajorNameColor(index, row, value) {
  202. if (row.IsDifferentDynamic == true) {
  203. return " <span style=\"color:red;\">" + value + "</span>";
  204. }
  205. else {
  206. return value
  207. }
  208. }
  209. </script>
  210. }
  211. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  212. @if (Request["aType"] == "update")
  213. {
  214. OnSuccess = "EMISFunction.FormSuccess";
  215. }
  216. @using (Ajax.BeginForm(new AjaxOptions
  217. {
  218. OnSuccess = OnSuccess,
  219. OnBegin = "EMISFunction.FormSubmit",
  220. OnComplete = "EMISFunction.FormComplete"
  221. }))
  222. {
  223. @Html.Hidden("hid_ExamsCategory")
  224. <div class="p_title">
  225. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  226. 补考设定信息</div>*@
  227. @if (Request["isView"] != "1")
  228. {
  229. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  230. }
  231. </div>
  232. <div class="search_list">
  233. @Html.HiddenFor(x => x.FinalExaminationID)
  234. @Html.HiddenFor(x => x.ClassID)
  235. <table cellpadding="0" cellspacing="0" id="FinalExaminationtable">
  236. <tr>
  237. <td>@Html.LabelFor(x => x.ClassName):
  238. </td>
  239. <td colspan="3">@Html.TextBoxFor(x => x.ClassName, new Dictionary<string, object> { { "style", "width:85%;" } })
  240. </td>
  241. </tr>
  242. <tr>
  243. <td>
  244. @Html.LabelFor(x => x.SchoolyearID):
  245. </td>
  246. <td>
  247. @Html.DropdownListFor(x=>x.SchoolyearID,new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid") })
  248. </td>
  249. <td>
  250. @Html.LabelFor(x => x.CollegeID):
  251. </td>
  252. <td>
  253. @Html.ComboGridFor(x => x.CollegeID, cgopcollege)
  254. </td>
  255. </tr>
  256. <tr>
  257. <td>
  258. @Html.LabelFor(x=> x.GradeYearID):
  259. </td>
  260. <td>
  261. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Grade, x => x.GradeYearID)
  262. </td>
  263. <td>
  264. @Html.LabelFor(x => x.StandardName):
  265. </td>
  266. <td>
  267. @Html.ComboGridFor(x => x.StandardID, cgopStandard)
  268. </td>
  269. </tr>
  270. <tr>
  271. <td>@Html.LabelFor(x => x.ClassmajorName):
  272. </td>
  273. <td colspan="3">@Html.TextBoxFor(x => x.ClassmajorName, new Dictionary<string, object> { { "style", "width:45%;" } })
  274. <button onclick="ResitExamination_ClassmajorAdd()" type="button" title="...">...</button>
  275. </td>
  276. </tr>
  277. <tr>
  278. @if (Model.FinalExaminationID == null)
  279. {
  280. <td>
  281. @Html.LabelFor(x => x.CoursematerialID):
  282. </td>
  283. <td>
  284. @Html.ComboGridFor(x => x.CoursematerialID, cgopEnableCourse)
  285. </td>
  286. }
  287. else
  288. {
  289. <td>
  290. @Html.LabelFor(x => x.CoursematerialID):
  291. </td>
  292. <td>
  293. @Html.ComboGridFor(x => x.CoursematerialID, cgopEnableAndUseCourse)
  294. </td>
  295. }
  296. <td>
  297. @Html.LabelFor(x => x.CourseTypeID):
  298. </td>
  299. <td>
  300. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID)
  301. </td>
  302. </tr>
  303. <tr>
  304. <td>
  305. @Html.LabelFor(x => x.ExamsCategoryID):
  306. </td>
  307. <td>
  308. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExamsCategory, x => x.ExamsCategoryID, new DropdownListOptions { OnSelect = "QueryExamsCategory" })
  309. </td>
  310. <td>
  311. @Html.LabelFor(x => x.DepartmentID):
  312. </td>
  313. <td>
  314. @Html.ComboGridFor(x => x.DepartmentID, cgopdepartment)
  315. </td>
  316. </tr>
  317. <tr>
  318. <td>@Html.LabelFor(x=>x.ResultTypeID)
  319. </td>
  320. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ResultType, (x => x.ResultTypeID))
  321. </td>
  322. <td>@Html.LabelFor(x => x.Credit):
  323. </td>
  324. <td>
  325. @Html.TextBoxFor(x => x.Credit)
  326. </td>
  327. </tr>
  328. <tr>
  329. <td>@Html.LabelFor(x => x.ExaminationModeID):
  330. </td>
  331. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExaminationMode, (x => x.ExaminationModeID))
  332. </td>
  333. <td>
  334. @Html.LabelFor(x => x.ExamsDatetime):
  335. </td>
  336. <td>
  337. @Html.TextBoxFor(x => x.ExamsDatetime, new TextBoxOptions { TextBoxType = TextBoxType.Date })
  338. </td>
  339. </tr>
  340. @*<tr>
  341. <td>
  342. @Html.LabelFor(x => x.IsEntry):
  343. </td>
  344. <td>
  345. @if (Model.IsEntry == true)
  346. {
  347. @Html.CheckBoxFor(x => x.IsEntry, new Dictionary<string, object> { { "disabled", "true" } })
  348. }
  349. else
  350. {
  351. @Html.CheckBoxFor(x => x.IsEntry)
  352. }
  353. </td>
  354. </tr>*@
  355. <tr>
  356. <td>
  357. @Html.LabelFor(x => x.EntryDeadlineTime):
  358. </td>
  359. <td>
  360. @Html.TextBoxFor(x => x.EntryDeadlineTime, new TextBoxOptions { TextBoxType = TextBoxType.Date })
  361. </td>
  362. <td>
  363. @Html.LabelFor(x => x.CreatorUserName):
  364. </td>
  365. <td>
  366. @Html.ComboGridFor(x => x.CreatorUserID, cgopUser)
  367. </td>
  368. </tr>
  369. <tr>
  370. <td>
  371. @Html.LabelFor(x => x.isAutoAdd):
  372. </td>
  373. <td>
  374. @Html.CheckBoxFor(x => x.isAutoAdd)
  375. </td>
  376. <td>
  377. @Html.LabelFor(x => x.TotalHours):
  378. </td>
  379. <td>
  380. @Html.TextBoxFor(x => x.TotalHours)
  381. </td>
  382. </tr>
  383. @*<tr>
  384. <td rowspan="2">
  385. <label>学生名单:</label>
  386. </td>
  387. <td colspan="3">
  388. <div style="line-height: 30px; font-size: 12px; text-align: left;">@Html.ContextMenuBar("Settings")</div>
  389. </td>
  390. </tr>
  391. <tr>
  392. <td colspan="3">
  393. <div style="width: 100%; height: 250px; overflow: scroll; scrollbar-arrow-color:#ffffff; scrollbar-highlight-color:#ffffff; scrollbar-3dlight-color:#70807d; scrollbar-shadow-color:#ffffff; scrollbar-darkshadow-color:#70807d; scrollbar-track-color:#ffffff">
  394. @Html.DataGrid(new DataGridOptions
  395. {
  396. Columns = new List<DataGridColumn>()
  397. {
  398. new CheckBoxFieldColumn { FieldName="UserID" },
  399. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, CustomFormatFun = "LoginIDColor",Width=0.08 },
  400. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center, CustomFormatFun = "UserNameColor",Width=0.04 },
  401. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center, CustomFormatFun = "SexNameColor",Width=0.03 },
  402. new BoundFieldColumn { FieldName="CoursematerialName", HeaderText="课程名称", Align=AlignStyle.Center, CustomFormatFun = "CoursematerialNameColor",Width=0.1 },
  403. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center, CustomFormatFun = "ClassmajorNameColor",Width=0.1 },
  404. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", Align=AlignStyle.Center, CustomFormatFun = "InSchoolStatusNameColor",Width=0.04 },
  405. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", Align=AlignStyle.Center, CustomFormatFun = "StudentStatusNameColor",Width=0.04 },
  406. new BoundFieldColumn { FieldName="IsDifferentDynamic", HeaderText="是否异动申请", Align=AlignStyle.Center, IsHidden = true }
  407. },
  408. IsCheckOnSelect = true,
  409. DataSourceUrl = Url.Content("~/ResitExamination/ResitExaminationStudentList?finalExaminationID=" + Model.FinalExaminationID),
  410. IsPostBack = true,
  411. ID = "dgStudentList",
  412. IsPagination = false,
  413. IsShowRowNumbers = true,
  414. IsSingleSelect = false
  415. })
  416. </div>
  417. </td>
  418. </tr>*@
  419. </table>
  420. </div>
  421. }
  422. </div>