Create.cshtml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. @model EMIS.ViewModel.EvaluationManage.EvaluationManage.EvaluationCollegeScoreView
  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 cgopCourse = new ComboGridOptions
  74. {
  75. TextField = "CourseName",
  76. ValueField = "CoursematerialID",
  77. ID = "CourseComboGrid",
  78. Name = "CourseComboGrid",
  79. GridOptions = new DataGridOptions
  80. {
  81. Columns = new List<DataGridColumn>()
  82. {
  83. new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.08 },
  84. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.15 }
  85. },
  86. IsCheckOnSelect = true,
  87. DataSourceUrl = Url.Content("~/Coursematerial/List"),
  88. IsPagination = true,
  89. IsShowRowNumbers = true,
  90. IsSingleSelect = false
  91. }
  92. };
  93. //教师信息
  94. ComboGridOptions cgopStaff = new ComboGridOptions
  95. {
  96. TextField = "Name",
  97. ValueField = "UserID",
  98. ID = "StaffComboGrid",
  99. Name = "StaffComboGrid",
  100. GridOptions = new DataGridOptions
  101. {
  102. Columns = new List<DataGridColumn>()
  103. {
  104. new BoundFieldColumn { FieldName="StaffCode", HeaderText="教师工号", Align=AlignStyle.Center, Width=0.1 },
  105. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.1 }
  106. },
  107. IsCheckOnSelect = true,
  108. DataSourceUrl = Url.Content("~/Staff/List"),
  109. IsPagination = true,
  110. IsShowRowNumbers = true,
  111. IsSingleSelect = false
  112. }
  113. };
  114. }
  115. @section scripts{
  116. <script type="text/javascript">
  117. var nonSelect = "@DropdownList.SELECT_ALL";
  118. //联动查询
  119. function queryCampus(data) {
  120. var campusID = $("#CampusDropdown").combogridX("getValue");
  121. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@@|'})";
  122. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  123. $("#DepartmentDropdown").combogridX("reload", eval(jsonString));
  124. }
  125. function queryCollege(data) {
  126. var campusID = $("#CampusDropdown").combogridX("getValue");
  127. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  128. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@@|";
  129. jsonString += "CollegeDropdown|*|" + collegeID + "|@@|'})";
  130. $("#DepartmentDropdown").combogridX("reload", eval(jsonString));
  131. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  132. }
  133. //确定
  134. function EvaluationCollegeScore_CreateConfirm() {
  135. var schoolyearID = $("#SchoolyearID").combobox("getValue");
  136. if (schoolyearID == null || schoolyearID == "" || schoolyearID == "-1") {
  137. $.messager.alert("系统提示", "请选择学年学期。");
  138. return;
  139. }
  140. $(document.forms[0]).submit();
  141. }
  142. </script>
  143. }
  144. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  145. @using (Ajax.BeginForm(new AjaxOptions
  146. {
  147. //生成成功后不关闭弹出页面
  148. OnSuccess = "EMISFunction.FormSuccessNoClose",
  149. OnBegin = "EMISFunction.FormSubmit",
  150. OnComplete = "EMISFunction.FormComplete"
  151. }))
  152. {
  153. <div class="p_title">
  154. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  155. </div>
  156. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Create")</div>
  157. </div>
  158. <div class="search_keyword">
  159. <div class="search_input">
  160. <ul>
  161. <li class="sn" style="padding-left: 5px;width: 65px;">@EMIS.Utility.RSL.Get("Campus"):</li>
  162. <li class="sv">
  163. @Html.ComboGrid(cgopCampus)
  164. </li>
  165. <li class="sn" style="padding-left: 5px;width: 65px;">@EMIS.Utility.RSL.Get("College"):</li>
  166. <li class="sv">
  167. @Html.ComboGrid(cgopCollege)
  168. </li>
  169. <li class="sn" style="padding-left: 5px;width: 85px;">所属教研室:</li>
  170. <li class="sv">
  171. @Html.ComboGrid(cgopDepartment)
  172. </li>
  173. </ul>
  174. <ul>
  175. <li class="sn" style="padding-left: 5px;width: 65px;">课程名称:</li>
  176. <li class="sv">
  177. @Html.ComboGrid(cgopCourse)
  178. </li>
  179. <li class="sn" style="padding-left: 5px;width: 65px;">任课教师:</li>
  180. <li class="sv">
  181. @Html.ComboGrid(cgopStaff)
  182. </li>
  183. <li class="sn" style="padding-left: 5px;color: red;width: 65px;">学年学期:</li>
  184. <li class="sv">
  185. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  186. {
  187. TextField = "Text",
  188. ValueField = "Value",
  189. BindType = DropdownListBindType.PleaseSelect,
  190. ItemSourceUrl = Url.Content("~/SchoolYear/DropDownBeforeCurrent"),
  191. SelectedValue = BaseExtensions.GetCurrentSchoolYearID()
  192. })
  193. </li>
  194. </ul>
  195. </div>
  196. </div>
  197. }
  198. </div>