Create.cshtml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. @model EMIS.ViewModel.EvaluationManage.StudentEvaluation.EvaluationStudentSettingView
  2. @using Bowin.Web.Controls.Mvc;
  3. @using EMIS.Entities;
  4. @using EMIS.Web.Controls;
  5. @{
  6. ViewBag.Title = "Create";
  7. //校区
  8. ComboGridOptions cgopCampus = new ComboGridOptions
  9. {
  10. TextField = "Name",
  11. ValueField = "CampusID",
  12. ID = "CampusDropdown",
  13. Name = "CampusDropdown",
  14. OnSelect = "queryCampus",
  15. GridOptions = new DataGridOptions
  16. {
  17. Columns = new List<DataGridColumn>()
  18. {
  19. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center, Width=0.1 },
  20. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center, Width=0.12 }
  21. },
  22. IsCheckOnSelect = true,
  23. DataSourceUrl = Url.Content("~/Campus/List"),
  24. IsPagination = true,
  25. IsShowRowNumbers = true,
  26. IsSingleSelect = false,
  27. }
  28. };
  29. //院系所
  30. ComboGridOptions cgopCollege = new ComboGridOptions
  31. {
  32. TextField = "Name",
  33. ValueField = "CollegeID",
  34. ID = "CollegeDropdown",
  35. Name = "CollegeDropdown",
  36. OnSelect = "queryCollege",
  37. GridOptions = new DataGridOptions
  38. {
  39. Columns = new List<DataGridColumn>()
  40. {
  41. //new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.1 },
  42. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center, Width=0.2 }
  43. },
  44. IsCheckOnSelect = true,
  45. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  46. IsPagination = true,
  47. IsShowRowNumbers = true,
  48. IsSingleSelect = false,
  49. }
  50. };
  51. //教研室
  52. ComboGridOptions cgopDepartment = new ComboGridOptions
  53. {
  54. TextField = "Name",
  55. ValueField = "DepartmentID",
  56. ID = "DepartmentDropdown",
  57. Name = "DepartmentDropdown",
  58. GridOptions = new DataGridOptions
  59. {
  60. Columns = new List<DataGridColumn>()
  61. {
  62. //new LinkButtonColumn { FieldName="No", HeaderText="开课教研室代码", Align=AlignStyle.Center, Width=0.1 },
  63. new BoundFieldColumn { FieldName="Name", HeaderText="开课教研室", Align=AlignStyle.Center, Width=0.2 }
  64. },
  65. IsCheckOnSelect = true,
  66. DataSourceUrl = Url.Content("~/Department/List"),
  67. IsPagination = true,
  68. IsShowRowNumbers = true,
  69. IsSingleSelect = false
  70. }
  71. };
  72. //年级
  73. ComboGridOptions cgopGrade = new ComboGridOptions
  74. {
  75. TextField = "GradeID",
  76. ValueField = "GradeID",
  77. ID = "DictionaryGrade",
  78. Name = "DictionaryGrade",
  79. OnSelect = "queryGrade",
  80. GridOptions = new DataGridOptions
  81. {
  82. Columns = new List<DataGridColumn>()
  83. {
  84. new BoundFieldColumn { FieldName="GradeID", HeaderText="年级", Align=AlignStyle.Center, Width=0.1 }
  85. },
  86. IsCheckOnSelect = true,
  87. DataSourceUrl = Url.Content("~/Grademajor/GradeBindComboGridOptions"),
  88. IsPagination = true,
  89. IsShowRowNumbers = true,
  90. IsSingleSelect = false,
  91. }
  92. };
  93. //专业名称
  94. ComboGridOptions cgopStandard = new ComboGridOptions
  95. {
  96. TextField = "StandardName",
  97. ValueField = "StandardID",
  98. ID = "DictionaryStandard",
  99. Name = "DictionaryStandard",
  100. GridOptions = new DataGridOptions
  101. {
  102. Columns = new List<DataGridColumn>()
  103. {
  104. new BoundFieldColumn { FieldName="StandardCode", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  105. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 }
  106. },
  107. IsCheckOnSelect = true,
  108. DataSourceUrl = Url.Content("~/Grademajor/StandardBindComboGridOptions"),
  109. IsPagination = true,
  110. IsShowRowNumbers = true,
  111. IsSingleSelect = false,
  112. }
  113. };
  114. //课程信息
  115. ComboGridOptions cgopCourse = new ComboGridOptions
  116. {
  117. TextField = "CourseName",
  118. ValueField = "CoursematerialID",
  119. ID = "CourseComboGrid",
  120. Name = "CourseComboGrid",
  121. GridOptions = new DataGridOptions
  122. {
  123. Columns = new List<DataGridColumn>()
  124. {
  125. new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.08 },
  126. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.15 }
  127. },
  128. IsCheckOnSelect = true,
  129. DataSourceUrl = Url.Content("~/Coursematerial/List"),
  130. IsPagination = true,
  131. IsShowRowNumbers = true,
  132. IsSingleSelect = false
  133. }
  134. };
  135. //教师信息
  136. ComboGridOptions cgopStaff = new ComboGridOptions
  137. {
  138. TextField = "Name",
  139. ValueField = "UserID",
  140. ID = "StaffComboGrid",
  141. Name = "StaffComboGrid",
  142. GridOptions = new DataGridOptions
  143. {
  144. Columns = new List<DataGridColumn>()
  145. {
  146. new BoundFieldColumn { FieldName="StaffCode", HeaderText="教师工号", Align=AlignStyle.Center, Width=0.1 },
  147. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.1 }
  148. },
  149. IsCheckOnSelect = true,
  150. DataSourceUrl = Url.Content("~/Staff/List"),
  151. IsPagination = true,
  152. IsShowRowNumbers = true,
  153. IsSingleSelect = false
  154. }
  155. };
  156. }
  157. @section scripts{
  158. <script type="text/javascript">
  159. var nonSelect = "@DropdownList.SELECT_ALL";
  160. //联动查询
  161. function queryCampus(data) {
  162. var campusID = $("#CampusDropdown").combogridX("getValue");
  163. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@@|'})";
  164. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  165. queryClass();
  166. }
  167. function queryCollege(data) {
  168. var campusID = $("#CampusDropdown").combogridX("getValue");
  169. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  170. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@@|";
  171. jsonString += "CollegeDropdown|*|" + collegeID + "|@@|'})";
  172. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  173. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  174. queryClass();
  175. }
  176. function queryGrade(data) {
  177. queryClass();
  178. }
  179. function queryClass() {
  180. var jsonString = "";
  181. var parameterString = "";
  182. var campusID = $("#CampusDropdown").combogridX("getValue");
  183. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  184. var gradeID = $("#DictionaryGrade").combogridX("getValue");
  185. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@@|";
  186. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@@|";
  187. if (gradeID != nonSelect) parameterString += "DictionaryGrade|*|" + gradeID + "|@@|";
  188. if (parameterString != "") {
  189. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  190. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  191. }
  192. else {
  193. $("#DictionaryStandard").combogridX("reload");
  194. }
  195. }
  196. //确定
  197. function EvaluationStudentSetting_CreateConfirm() {
  198. var schoolyearID = $("#SchoolyearID").combobox("getValue");
  199. if (schoolyearID == null || schoolyearID == "" || schoolyearID == "-1") {
  200. $.messager.alert("系统提示", "请选择学年学期。");
  201. return;
  202. }
  203. $(document.forms[0]).submit();
  204. }
  205. </script>
  206. }
  207. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  208. @using (Ajax.BeginForm(new AjaxOptions
  209. {
  210. //生成成功后不关闭弹出页面
  211. OnSuccess = "EMISFunction.FormSuccessNoClose",
  212. OnBegin = "EMISFunction.FormSubmit",
  213. OnComplete = "EMISFunction.FormComplete"
  214. }))
  215. {
  216. <div class="p_title">
  217. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  218. </div>
  219. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Create")</div>
  220. </div>
  221. <div class="search_keyword">
  222. <div class="search_input">
  223. <ul>
  224. <li class="sn" style="padding-left: 5px;width: 65px;">@EMIS.Utility.RSL.Get("Campus"):</li>
  225. <li class="sv">
  226. @Html.ComboGrid(cgopCampus)
  227. </li>
  228. <li class="sn" style="padding-left: 5px;width: 65px;">@EMIS.Utility.RSL.Get("College"):</li>
  229. <li class="sv">
  230. @Html.ComboGrid(cgopCollege)
  231. </li>
  232. <li class="sn" style="padding-left: 5px;width: 85px;">开课教研室:</li>
  233. <li class="sv">
  234. @Html.ComboGrid(cgopDepartment)
  235. </li>
  236. </ul>
  237. <ul>
  238. <li class="sn" style="padding-left: 5px;width: 65px;">年级:</li>
  239. <li class="sv">
  240. @*@Html.ComboGrid(cgopGrade)*@
  241. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Grade, DropdownListBindType.SelectAll,
  242. new ComboGridOptions
  243. {
  244. ID = "DictionaryGrade",
  245. Name = "DictionaryGrade",
  246. OnSelect = "queryGrade"
  247. })
  248. </li>
  249. <li class="sn" style="padding-left: 5px;width: 65px;">专业名称:</li>
  250. <li class="sv">
  251. @Html.ComboGrid(cgopStandard)
  252. </li>
  253. <li class="sn" style="padding-left: 5px;width: 65px;">课程名称:</li>
  254. <li class="sv">
  255. @Html.ComboGrid(cgopCourse)
  256. </li>
  257. </ul>
  258. <ul>
  259. <li class="sn" style="padding-left: 5px;width: 65px;">课程类型:</li>
  260. <li class="sv">
  261. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_CourseType, DropdownListBindType.SelectAll,
  262. new ComboGridOptions()
  263. {
  264. ID = "DictionaryCourseType",
  265. Name = "DictionaryCourseType"
  266. })
  267. </li>
  268. <li class="sn" style="padding-left: 5px;width: 65px;">处理方式:</li>
  269. <li class="sv">
  270. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_HandleMode, DropdownListBindType.SelectAll,
  271. new ComboGridOptions()
  272. {
  273. ID = "DictionaryHandleMode",
  274. Name = "DictionaryHandleMode"
  275. })
  276. </li>
  277. <li class="sn" style="padding-left: 5px;width: 65px;">授课方式:</li>
  278. <li class="sv">
  279. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_TeachingMode, DropdownListBindType.SelectAll,
  280. new ComboGridOptions()
  281. {
  282. ID = "DictionaryTeachingMode",
  283. Name = "DictionaryTeachingMode"
  284. })
  285. </li>
  286. </ul>
  287. <ul>
  288. <li class="sn" style="padding-left: 5px;width: 65px;">任课教师:</li>
  289. <li class="sv">
  290. @Html.ComboGrid(cgopStaff)
  291. </li>
  292. <li class="sn" style="padding-left: 5px;width: 65px;">任课方式:</li>
  293. <li class="sv">
  294. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.EM_TeachingMethod, DropdownListBindType.SelectAll,
  295. new ComboGridOptions()
  296. {
  297. ID = "DictionaryTeachingMethod",
  298. Name = "DictionaryTeachingMethod"
  299. })
  300. </li>
  301. <li class="sn" style="padding-left: 5px;color: red;width: 65px;">学年学期:</li>
  302. <li class="sv">
  303. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  304. {
  305. TextField = "Text",
  306. ValueField = "Value",
  307. BindType = DropdownListBindType.PleaseSelect,
  308. ItemSourceUrl = Url.Content("~/SchoolYear/DropDownBeforeCurrent"),
  309. SelectedValue = BaseExtensions.GetCurrentSchoolYearID()
  310. })
  311. </li>
  312. </ul>
  313. </div>
  314. </div>
  315. }
  316. </div>