Edit.cshtml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. @model EMIS.ViewModel.EvaluationManage.EvaluationSettingView
  2. @using EMIS.ViewModel;
  3. @using EMIS.Web.Controls;
  4. @using Bowin.Web.Controls.Mvc;
  5. @{
  6. Layout = "~/Views/Shared/_Layout.cshtml";
  7. ViewBag.Title = "评价设定编辑";
  8. var schoolyearID = ViewBag.schoolyearID;//学年学期
  9. var coursematerialID = ViewBag.coursematerialID;//课程
  10. //var campusID = ViewBag.schoolyearID;
  11. var collegeID = ViewBag.collegeID;//院系所
  12. var departmentID = ViewBag.departmentID; //教 研 室
  13. //加载教学任务班信息
  14. var cgopEducationMissionClassID = new ComboGridOptions
  15. {
  16. TextField = "Name",
  17. ValueField = "EducationMissionClassID",
  18. OnSelect = "SelectEducationMissionDropdownList",
  19. GridOptions = new DataGridOptions
  20. {
  21. Columns = new List<DataGridColumn>()
  22. {
  23. new BoundFieldColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center },
  24. new BoundFieldColumn { FieldName="Name", HeaderText="任务班名称", Align=AlignStyle.Center },
  25. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center },
  26. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center },
  27. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center },
  28. new BoundFieldColumn { FieldName="StartWeeklyNum", HeaderText="开始周次", Align=AlignStyle.Center },
  29. new BoundFieldColumn { FieldName="EndWeeklyNum", HeaderText="结束周次", Align=AlignStyle.Center },
  30. },
  31. IsCheckOnSelect = true,
  32. DataSourceUrl = Url.Action("EducationMissionClassList", "EvaluationSetting"),
  33. IsPagination = true,
  34. // OnLoadSuccessFun="LoadMissionDropdownList",
  35. IsShowRowNumbers = true,
  36. IsSingleSelect = false
  37. }
  38. };
  39. //加载评价表名信息
  40. var cgopEducationTableID = new ComboGridOptions
  41. {
  42. TextField = "Name",
  43. ValueField = "TableID",
  44. //OnSelect = "SelectCallback",
  45. OnSelect = "SelectEducationTableList",
  46. GridOptions = new DataGridOptions
  47. {
  48. Columns = new List<DataGridColumn>()
  49. {
  50. new BoundFieldColumn { FieldName="Code", HeaderText="评价编号", Align=AlignStyle.Center ,},
  51. new BoundFieldColumn { FieldName="Name", HeaderText="评价表名", Align=AlignStyle.Center ,},
  52. new BoundFieldColumn { FieldName="Type", HeaderText="评价类型", Align=AlignStyle.Center ,},
  53. },
  54. IsCheckOnSelect = true,
  55. DataSourceUrl = Url.Content("~/EvaluationTable/List"),
  56. IsPagination = true,
  57. IsShowRowNumbers = true,
  58. IsSingleSelect = false
  59. }
  60. };
  61. //加载院系所
  62. ComboGridOptions cgopCollege = new ComboGridOptions
  63. {
  64. TextField = "Name",
  65. ValueField = "CollegeID",
  66. ID = "CollegeDropdown",
  67. Name = "CollegeDropdown",
  68. OnSelect = "SelectCollegeDropdownList",
  69. GridOptions = new DataGridOptions
  70. {
  71. Columns = new List<DataGridColumn>()
  72. {
  73. new BoundFieldColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center },
  74. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center }
  75. },
  76. IsCheckOnSelect = true,
  77. DataSourceUrl = Url.Content("~/College/List"),
  78. IsPagination = true,
  79. IsShowRowNumbers = true,
  80. IsSingleSelect = false,
  81. OnLoadSuccessFun = "QueryCollegeDropdownList"
  82. }
  83. };
  84. //加载教研室
  85. ComboGridOptions cgopDepartment = new ComboGridOptions
  86. {
  87. TextField = "Name",
  88. ValueField = "DepartmentID",
  89. OnSelect = "reload",
  90. GridOptions = new DataGridOptions
  91. {
  92. Columns = new List<DataGridColumn>()
  93. {
  94. new BoundFieldColumn { FieldName="No", HeaderText="教研室编号", Align=AlignStyle.Center },
  95. new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center }
  96. },
  97. IsCheckOnSelect = true,
  98. DataSourceUrl = Url.Content("~/Department/List"),
  99. IsPagination = true,
  100. IsShowRowNumbers = true,
  101. IsSingleSelect = false,
  102. OnLoadSuccessFun = "QueryDepartmentDropdownList"
  103. }
  104. };
  105. //加载课程名称
  106. ComboGridOptions cgopCoursematerial = new ComboGridOptions
  107. {
  108. TextField = "CourseName",
  109. ValueField = "CoursematerialID",
  110. OnSelect = "SelectBuildingsDropdownList",
  111. GridOptions = new DataGridOptions
  112. {
  113. Columns = new List<DataGridColumn>()
  114. {
  115. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center },
  116. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center }
  117. },
  118. IsCheckOnSelect = true,
  119. // DataSourceUrl = Url.Content("~/Coursematerial/ListForDropdown"),
  120. DataSourceUrl = Url.Content("~/EvaluationSetting/GetCoursematerialQuery"),
  121. IsPagination = true,
  122. IsShowRowNumbers = true,
  123. OnLoadSuccessFun = "LoadMissionDropdownList",
  124. IsSingleSelect = false
  125. }
  126. };
  127. }
  128. <div class="separatorline">
  129. @using (Ajax.BeginForm(new AjaxOptions { Url = "/EvaluationSetting/Edit", OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  130. {
  131. <div class="p_title">
  132. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  133. 评价设定信息
  134. </div>
  135. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  136. @if (Model.OpenStatus == (int)CF_YesOrNoStatus.No)
  137. {
  138. @Html.ContextMenuBar("Edit")
  139. }
  140. </div>
  141. </div>
  142. <div class="gobal-from">
  143. @Html.HiddenFor(x => x.EvaluationSettingID)
  144. <table cellpadding="0" cellspacing="1">
  145. <tr>
  146. <th>@Html.LabelFor(m => m.SchoolyearID):
  147. </th>
  148. <td>
  149. @Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { BindType = DropdownListBindType.None, ItemSourceUrl = "~/SchoolYear/DropDown", TextField = "Text", ValueField = "Value", ID = "SchoolyearDropdown", Name = "SchoolyearDropdown", OnSelect = "SelectSchoolyearDropdownList", OnLoadSuccess = "LoadMissionDropdownList" })
  150. </td>
  151. <th>@Html.LabelFor(m => m.CollegeID):
  152. </th>
  153. <td>
  154. @Html.DropdownListFor(x => x.CollegeID, new DropdownListOptions { BindType = DropdownListBindType.None, ItemSourceUrl = Url.Content("~/College/CollegeDropdownListBanids"), TextField = "Text", ValueField = "Value", ID = "CollegeDropdown", Name = "CollegeDropdown", OnSelect = "SelectCollegeDropdownList", OnLoadSuccess = "QueryCollegeDropdownList" })
  155. @* @Html.ComboGridFor(x => x.CollegeID, cgopCollege)*@
  156. </td>
  157. </tr>
  158. <tr>
  159. <th>@Html.LabelFor(m => m.DepartmentID):
  160. </th>
  161. <td>
  162. @Html.DropdownListFor(x => x.DepartmentID, new DropdownListOptions { BindType = DropdownListBindType.None, TextField = "Text", ValueField = "Value", ID = "DepartmentDropdown", Name = "DepartmentDropdown", OnLoadSuccess = "QueryDepartmentDropdownList", OnSelect = "SelectDepartmentDropdownList" })
  163. @* @Html.ComboGridFor(x => x.DepartmentID, cgopDepartment)*@
  164. </td>
  165. <th>@Html.LabelFor(m => m.CoursematerialID):
  166. </th>
  167. <td>
  168. @Html.ComboGridFor(x => x.CoursematerialID, cgopCoursematerial)
  169. </td>
  170. </tr>
  171. <tr>
  172. <th>@Html.LabelFor(m => m.EducationMissionClassID):
  173. </th>
  174. <td>
  175. @Html.ComboGridFor(m => m.EducationMissionClassID, cgopEducationMissionClassID)
  176. </td>
  177. <th>@Html.LabelFor(m => m.EvaluationTableID):
  178. </th>
  179. <td>
  180. @Html.ComboGridFor(m => m.EvaluationTableID, cgopEducationTableID)
  181. </td>
  182. </tr>
  183. <tr>
  184. <th>@Html.LabelFor(m => m.EvaluationTableTypeName):
  185. </th>
  186. <td>
  187. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EM_EvaluationTableType, (x => x.EvaluationTableTypeID), new DropdownListOptions { BindType = DropdownListBindType.None, ID = "EvaluationTableTypeDropdown", Name = "EvaluationTableTypeDropdown" })
  188. </td>
  189. <th>@Html.LabelFor(m => m.OpenStatus):
  190. </th>
  191. <td>
  192. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_YesOrNoStatus, m => m.OpenStatus)
  193. </td>
  194. </tr>
  195. </table>
  196. </div>
  197. }
  198. </div>
  199. @section scripts{
  200. <script src="~/Scripts/Business/EvaluationManage/EvaluationManage/EvaluationSettingEdit.js" type="text/javascript">
  201. </script>
  202. <script type="text/javascript">
  203. function EvaluationStudent_Save() {
  204. var id = $('#EvaluationSettingID').val();
  205. var educationMissionClassID = $("#EducationMissionClassID").combogridX('getValue');
  206. var tableID = $("#EvaluationTableID").combogridX('getValue');
  207. $.post('/StudentEvaluation/Verification', { Id: id, EducationMissionClassID: educationMissionClassID, TableID: tableID }, function (data) {
  208. if (data == "成功") {
  209. $(document.forms[0]).submit();
  210. } else {
  211. $.messager.alert("系统提示", data);
  212. }
  213. });
  214. }
  215. var nonSelect = "@DropdownList.SELECT_ALL";
  216. </script>
  217. }