Edit.cshtml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. @model EMIS.ViewModel.EvaluationManage.StudentEvaluation.EvaluationStudentSettingView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isEnable = Request["type"] == "detail" ? false : true;
  7. //院系所
  8. ComboGridOptions cgopCollege = new ComboGridOptions
  9. {
  10. ID = "CollegeID",
  11. TextField = "Name",
  12. ValueField = "CollegeID",
  13. IsEnabled = false,
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  19. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 }
  20. },
  21. PageSize = 5,
  22. IsCheckOnSelect = true,
  23. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false,
  27. }
  28. };
  29. //教研室
  30. ComboGridOptions cgopDepartment = new ComboGridOptions
  31. {
  32. ID = "DepartmentID",
  33. TextField = "Name",
  34. ValueField = "DepartmentID",
  35. IsEnabled = false,
  36. GridOptions = new DataGridOptions
  37. {
  38. Columns = new List<DataGridColumn>()
  39. {
  40. new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.1 },
  41. new BoundFieldColumn { FieldName="Name", HeaderText="开课教研室", Align=AlignStyle.Center, Width=0.2 },
  42. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CourseCollege"), Align=AlignStyle.Center, Width=0.2 }
  43. },
  44. PageSize = 5,
  45. IsCheckOnSelect = true,
  46. DataSourceUrl = Url.Content("~/Department/List"),
  47. IsPagination = true,
  48. IsShowRowNumbers = true,
  49. IsSingleSelect = false
  50. }
  51. };
  52. //课程信息
  53. ComboGridOptions cgopCourse = new ComboGridOptions
  54. {
  55. ID = "CoursematerialID",
  56. TextField = "CourseName",
  57. ValueField = "CoursematerialID",
  58. IsEnabled = false,
  59. GridOptions = new DataGridOptions
  60. {
  61. Columns = new List<DataGridColumn>()
  62. {
  63. new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.1 },
  64. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.2 },
  65. new BoundFieldColumn { FieldName="IsEnableName", HeaderText="是否启用", Align=AlignStyle.Center, Width=0.1, CustomFormatFun="SetRedColumn" }
  66. },
  67. PageSize = 5,
  68. IsCheckOnSelect = true,
  69. DataSourceUrl = Url.Content("~/Coursematerial/GetEnableAndUseCoursematerialView?coursematerialID=" + Model.CoursematerialID),
  70. IsPagination = true,
  71. IsShowRowNumbers = true,
  72. IsSingleSelect = false
  73. }
  74. };
  75. //任课教师
  76. ComboGridOptions cgopStaff = new ComboGridOptions
  77. {
  78. TextField = "Name",
  79. ValueField = "UserID",
  80. IsEnabled = isEnable,
  81. GridOptions = new DataGridOptions
  82. {
  83. Columns = new List<DataGridColumn>()
  84. {
  85. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教师工号", Align=AlignStyle.Center ,Width=0.1 },
  86. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1 }
  87. },
  88. PageSize = 5,
  89. IsCheckOnSelect = true,
  90. DataSourceUrl = Url.Content("~/Staff/List"),
  91. IsPagination = true,
  92. IsShowRowNumbers = true,
  93. IsSingleSelect = false
  94. }
  95. };
  96. //参评类型
  97. ComboGridOptions cgopEvaluationParticipateType = new ComboGridOptions
  98. {
  99. TextField = "ParticipateTypeName",
  100. ValueField = "EvaluationParticipateTypeID",
  101. OnSelect = "queryEvaluationParticipateType",
  102. IsEnabled = isEnable,
  103. GridOptions = new DataGridOptions
  104. {
  105. Columns = new List<DataGridColumn>()
  106. {
  107. new BoundFieldColumn { FieldName="ParticipateTypeName", HeaderText="参评类型", Align=AlignStyle.Center, Width=0.1, OrderFieldName="ParticipateTypeID" },
  108. new BoundFieldColumn { FieldName="IsStudentName", HeaderText="学生用", Align=AlignStyle.Center, Width=0.08, OrderFieldName="IsStudent", CustomFormatFun="SetRedColumn"}
  109. },
  110. PageSize = 5,
  111. IsCheckOnSelect = true,
  112. DataSourceUrl = Url.Content("~/EvaluationParticipateType/List"),
  113. IsPagination = true,
  114. IsShowRowNumbers = true,
  115. IsSingleSelect = false
  116. }
  117. };
  118. //评价表名
  119. ComboGridOptions cgopEvaluationTable = new ComboGridOptions
  120. {
  121. TextField = "Name",
  122. ValueField = "EvaluationTableID",
  123. OnSelect = "queryEvaluationTable",
  124. IsEnabled = isEnable,
  125. GridOptions = new DataGridOptions
  126. {
  127. Columns = new List<DataGridColumn>()
  128. {
  129. new BoundFieldColumn { FieldName="Code", HeaderText="编号", Align=AlignStyle.Center, Width=0.1 },
  130. new BoundFieldColumn { FieldName="Name", HeaderText="评价表名", Align=AlignStyle.Center, Width=0.25 },
  131. //new BoundFieldColumn { FieldName="ParticipateTypeName", HeaderText="参评类型", Align=AlignStyle.Center, Width=0.12, OrderFieldName="ParticipateTypeID" },
  132. //new BoundFieldColumn { FieldName="IsStudentName", HeaderText="学生用", Align=AlignStyle.Center, Width=0.1, OrderFieldName="IsStudent", CustomFormatFun="SetRedColumn" },
  133. new BoundFieldColumn { FieldName="EvaluationTypeName", HeaderText="评价类型", Align=AlignStyle.Center, Width=0.1 },
  134. new BoundFieldColumn { FieldName="IsEnabledName", HeaderText="是否启用", Align=AlignStyle.Center, Width=0.1, OrderFieldName="IsEnabled", CustomFormatFun="SetRedColumn" }
  135. },
  136. PageSize = 5,
  137. IsCheckOnSelect = true,
  138. DataSourceUrl = Url.Content("~/EvaluationTable/GetEvaluationTableEnabledAndUseList?evaluationTableID=" + Model.EvaluationTableID),
  139. IsPagination = true,
  140. IsShowRowNumbers = true,
  141. IsSingleSelect = false
  142. }
  143. };
  144. }
  145. @section scripts{
  146. <script src="~/Scripts/Business/EvaluationManage/StudentEvaluation/EvaluationStudentSettingEdit.js" type="text/javascript"></script>
  147. <script type="text/javascript">
  148. var nonSelect = "@DropdownList.SELECT_ALL";
  149. </script>
  150. }
  151. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  152. @using (Ajax.BeginForm(new AjaxOptions
  153. {
  154. OnSuccess = "EMISFunction.FormSuccess",
  155. OnBegin = "EMISFunction.FormSubmit",
  156. OnComplete = "EMISFunction.FormComplete"
  157. }))
  158. {
  159. <div class="p_title">
  160. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  161. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  162. @if (Request["type"] != "detail")
  163. {
  164. @Html.ContextMenuBar("Edit")
  165. }
  166. </div>
  167. </div>
  168. <div class="search_list">
  169. @Html.HiddenFor(x => x.EvaluationStudentSettingID)
  170. @Html.HiddenFor(x => x.EducationMissionClassID)
  171. <table cellpadding="0" cellspacing="0" id="evaluationstudentsettingtable">
  172. <tr>
  173. <td style="color:red;">
  174. @Html.LabelFor(x => x.MissionClassName):
  175. </td>
  176. <td colspan="3">
  177. @Html.TextBoxFor(x => x.MissionClassName, new TextBoxOptions() { IsEnabled = false }, new Dictionary<string, string> { { "style", "width:92%;" } })
  178. </td>
  179. </tr>
  180. <tr>
  181. <td>
  182. @Html.LabelFor(x => x.SchoolyearCode):
  183. </td>
  184. <td>
  185. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  186. {
  187. BindType = DropdownListBindType.PleaseSelect,
  188. TextField = "Text",
  189. ValueField = "Value",
  190. IsEnabled = false,
  191. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid")
  192. })
  193. </td>
  194. <td>
  195. @Html.LabelFor(x => x.CollegeName):
  196. </td>
  197. <td>
  198. @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
  199. </td>
  200. </tr>
  201. <tr>
  202. <td style="color:red;">
  203. @Html.LabelFor(x => x.CourseName):
  204. </td>
  205. <td>
  206. @Html.ComboGridFor(x => x.CoursematerialID, cgopCourse)
  207. </td>
  208. <td style="color:red;">
  209. @Html.LabelFor(x => x.DepartmentName):
  210. </td>
  211. <td>
  212. @Html.ComboGridFor(x => x.DepartmentID, cgopDepartment)
  213. </td>
  214. </tr>
  215. <tr>
  216. <td>
  217. @Html.LabelFor(x => x.CourseStructureName):
  218. </td>
  219. <td>
  220. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseStructure, x => x.CourseStructureID, new DropdownListOptions() { IsEnabled = false })
  221. </td>
  222. <td>
  223. @Html.LabelFor(x => x.CourseCategoryName):
  224. </td>
  225. <td>
  226. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseCategory, x => x.CourseCategoryID, new DropdownListOptions() { IsEnabled = false })
  227. </td>
  228. </tr>
  229. <tr>
  230. <td style="color:red;">
  231. @Html.LabelFor(x => x.CourseTypeName):
  232. </td>
  233. <td>
  234. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID, new DropdownListOptions() { IsEnabled = false })
  235. </td>
  236. <td>
  237. @Html.LabelFor(x => x.CourseQualityName):
  238. </td>
  239. <td>
  240. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseQuality, x => x.CourseQualityID, new DropdownListOptions() { IsEnabled = false })
  241. </td>
  242. </tr>
  243. <tr>
  244. <td>
  245. @Html.LabelFor(x => x.Credit):
  246. </td>
  247. <td>
  248. @*@Html.TextBoxFor(x => x.Credit, new Dictionary<string, object> { { "readOnly", "true" } })*@
  249. @Html.TextBoxFor(x => x.Credit, new TextBoxOptions() { IsEnabled = false })
  250. </td>
  251. <td>
  252. @Html.LabelFor(x => x.HandleModeID):
  253. </td>
  254. <td>
  255. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_HandleMode, (x => x.HandleModeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  256. </td>
  257. </tr>
  258. <tr>
  259. <td style="color:red;">
  260. @Html.LabelFor(x => x.TeachingModeID):
  261. </td>
  262. <td>
  263. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.CF_TeachingMode, (x => x.TeachingModeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  264. </td>
  265. <td>
  266. @Html.LabelFor(x => x.MissionClassStatus):
  267. </td>
  268. <td>
  269. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_EducationMissionClassStatus, (x => x.MissionClassStatus), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = false })
  270. </td>
  271. </tr>
  272. <tr>
  273. <td>
  274. @Html.LabelFor(x => x.ParticipateTypeName):
  275. </td>
  276. <td>
  277. @Html.ComboGridFor(x => x.EvaluationParticipateTypeID, cgopEvaluationParticipateType)
  278. </td>
  279. <td style="color:red;">
  280. @Html.LabelFor(x => x.EvaluationTableName):
  281. </td>
  282. <td>
  283. @Html.ComboGridFor(x => x.EvaluationTableID, cgopEvaluationTable)
  284. </td>
  285. </tr>
  286. <tr>
  287. <td style="color:red;">
  288. @Html.LabelFor(x => x.StaffName):
  289. </td>
  290. <td>
  291. @Html.ComboGridFor(x => x.UserID, cgopStaff)
  292. </td>
  293. <td style="color:red;">
  294. @Html.LabelFor(x => x.TeachingMethodID):
  295. </td>
  296. <td>
  297. @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_TeachingMethod, (x => x.TeachingMethodID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { IsEnabled = isEnable })
  298. </td>
  299. </tr>
  300. <tr>
  301. <td>
  302. @Html.LabelFor(x => x.Remark):
  303. </td>
  304. <td colspan="3">
  305. @if (!isEnable)
  306. {
  307. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  308. {
  309. { "style", "width: 90%;min-height: 60px" },
  310. { "disabled", "true" }
  311. })
  312. }
  313. else
  314. {
  315. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 60px" } })
  316. }
  317. </td>
  318. </tr>
  319. </table>
  320. </div>
  321. }
  322. </div>