Edit.cshtml 18 KB

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