Approve.cshtml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. @model EMIS.ViewModel.EvaluationManage.EvaluationManage.EvaluationStudentScoreView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Approve";
  6. var isEnable = (Request["evaluationStudentScoreID"] ?? "") == "";
  7. //院系所
  8. ComboGridOptions cgopCollege = new ComboGridOptions
  9. {
  10. ID = "CollegeID",
  11. TextField = "Name",
  12. ValueField = "CollegeID",
  13. IsEnabled = isEnable,
  14. OnSelect = "queryCollege",
  15. GridOptions = new DataGridOptions
  16. {
  17. Columns = new List<DataGridColumn>()
  18. {
  19. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  20. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 }
  21. },
  22. PageSize = 5,
  23. IsCheckOnSelect = true,
  24. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  25. IsPagination = true,
  26. IsShowRowNumbers = true,
  27. IsSingleSelect = false,
  28. }
  29. };
  30. //教研室
  31. ComboGridOptions cgopDepartment = new ComboGridOptions
  32. {
  33. ID = "DepartmentID",
  34. TextField = "Name",
  35. ValueField = "DepartmentID",
  36. IsEnabled = isEnable,
  37. OnSelect = "queryDepartment",
  38. GridOptions = new DataGridOptions
  39. {
  40. Columns = new List<DataGridColumn>()
  41. {
  42. new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.1 },
  43. new BoundFieldColumn { FieldName="Name", HeaderText="开课教研室", Align=AlignStyle.Center, Width=0.2 },
  44. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CourseCollege"), Align=AlignStyle.Center, Width=0.2 }
  45. },
  46. PageSize = 5,
  47. IsCheckOnSelect = true,
  48. DataSourceUrl = Url.Content("~/Department/List"),
  49. IsPagination = true,
  50. IsShowRowNumbers = true,
  51. IsSingleSelect = false
  52. }
  53. };
  54. //课程信息
  55. ComboGridOptions cgopCourse = new ComboGridOptions
  56. {
  57. ID = "CoursematerialID",
  58. TextField = "CourseName",
  59. ValueField = "CoursematerialID",
  60. IsEnabled = isEnable,
  61. GridOptions = new DataGridOptions
  62. {
  63. Columns = new List<DataGridColumn>()
  64. {
  65. new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.1 },
  66. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.2 },
  67. new BoundFieldColumn { FieldName="IsEnableName", HeaderText="是否启用", Align=AlignStyle.Center, Width=0.1, CustomFormatFun="SetRedColumn" }
  68. },
  69. PageSize = 5,
  70. IsCheckOnSelect = true,
  71. DataSourceUrl = Url.Content("~/Coursematerial/GetEnableAndUseCoursematerialView?coursematerialID=" + Model.CoursematerialID),
  72. IsPagination = true,
  73. IsShowRowNumbers = true,
  74. IsSingleSelect = false
  75. }
  76. };
  77. //任课教师
  78. ComboGridOptions cgopStaff = new ComboGridOptions
  79. {
  80. TextField = "Name",
  81. ValueField = "UserID",
  82. IsEnabled = isEnable,
  83. GridOptions = new DataGridOptions
  84. {
  85. Columns = new List<DataGridColumn>()
  86. {
  87. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教师工号", Align=AlignStyle.Center ,Width=0.1 },
  88. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center ,Width=0.1 }
  89. },
  90. PageSize = 5,
  91. IsCheckOnSelect = true,
  92. DataSourceUrl = Url.Content("~/Staff/List"),
  93. IsPagination = true,
  94. IsShowRowNumbers = true,
  95. IsSingleSelect = false
  96. }
  97. };
  98. }
  99. @{
  100. var listAction = ViewBag.ListAction as List<DropdownListItem>;
  101. var defaultAction = listAction.FirstOrDefault(x => true);
  102. var defaultActionValue = (defaultAction == null ? null : defaultAction.Value);
  103. }
  104. @section scripts{
  105. <script src="~/Scripts/Business/EvaluationManage/EvaluationManage/EvaluationStudentScoreApprove.js" type="text/javascript"></script>
  106. }
  107. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  108. @using (Ajax.BeginForm(new AjaxOptions
  109. {
  110. OnSuccess = "EMISFunction.FormSuccess",
  111. OnBegin = "EMISFunction.FormSubmit",
  112. OnComplete = "EMISFunction.FormComplete"
  113. }))
  114. {
  115. <div class="p_title">
  116. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  117. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Approve")</div>
  118. </div>
  119. <div class="search_list">
  120. @Html.HiddenFor(x => x.EvaluationStudentScoreID)
  121. <table cellpadding="0" cellspacing="0" id="evaluationstudentscoretable">
  122. <tr>
  123. <td>
  124. @Html.LabelFor(x => x.SchoolyearCode):
  125. </td>
  126. <td>
  127. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  128. {
  129. BindType = DropdownListBindType.PleaseSelect,
  130. TextField = "Text",
  131. ValueField = "Value",
  132. IsEnabled = isEnable,
  133. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid")
  134. })
  135. </td>
  136. <td>
  137. @Html.LabelFor(x => x.CollegeName):
  138. </td>
  139. <td>
  140. @Html.ComboGridFor(x => x.CollegeID, cgopCollege)
  141. </td>
  142. </tr>
  143. <tr>
  144. <td>
  145. @Html.LabelFor(x => x.CourseName):
  146. </td>
  147. <td>
  148. @Html.ComboGridFor(x => x.CoursematerialID, cgopCourse)
  149. </td>
  150. <td>
  151. @Html.LabelFor(x => x.DepartmentName):
  152. </td>
  153. <td>
  154. @Html.ComboGridFor(x => x.DepartmentID, cgopDepartment)
  155. </td>
  156. </tr>
  157. <tr>
  158. <td style="color:red;">
  159. @Html.LabelFor(x => x.StaffName):
  160. </td>
  161. <td>
  162. @Html.ComboGridFor(x => x.UserID, cgopStaff)
  163. </td>
  164. <td style="color:red;">
  165. @Html.LabelFor(x => x.TotalScore):
  166. </td>
  167. <td>
  168. @Html.TextBoxFor(x => x.TotalScore, new TextBoxOptions() { IsEnabled = isEnable })
  169. </td>
  170. </tr>
  171. <tr>
  172. <td>
  173. @Html.LabelFor(x => x.Remark):
  174. </td>
  175. <td colspan="3">
  176. @if (!isEnable)
  177. {
  178. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  179. {
  180. { "style", "width: 90%;min-height: 45px" },
  181. { "disabled", "true" }
  182. })
  183. }
  184. else
  185. {
  186. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 45px" } })
  187. }
  188. </td>
  189. </tr>
  190. <tr>
  191. <td style="color: red;">
  192. @Html.LabelFor(x => x.Action):
  193. </td>
  194. <td colspan="3">
  195. @Html.DropdownList(new DropdownListOptions
  196. {
  197. BindType = DropdownListBindType.None,
  198. ID = "ddlAction",
  199. Name = "ddlAction",
  200. ItemList = listAction,
  201. SelectedValue = defaultActionValue
  202. })
  203. </td>
  204. </tr>
  205. <tr>
  206. <td>
  207. @Html.LabelFor(x => x.Comment):
  208. </td>
  209. <td colspan="3">
  210. @Html.TextAreaFor(x => x.Comment, new Dictionary<string, object>
  211. {
  212. { "style", "width: 90%;min-height: 50px" }
  213. })
  214. </td>
  215. </tr>
  216. </table>
  217. </div>
  218. }
  219. </div>