AssignClass.cshtml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. @model EMIS.ViewModel.EnrollManage.NewStudentManage.NewStudentView
  2. @using Bowin.Web.Controls.Mvc;
  3. @using EMIS.Entities;
  4. @using EMIS.Web.Controls;
  5. @{
  6. ViewBag.Title = "AssignClass";
  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 cgopGrade = new ComboGridOptions
  53. {
  54. TextField = "GradeID",
  55. ValueField = "GradeID",
  56. ID = "DictionaryGrade",
  57. Name = "DictionaryGrade",
  58. OnSelect = "queryGrade",
  59. GridOptions = new DataGridOptions
  60. {
  61. Columns = new List<DataGridColumn>()
  62. {
  63. new BoundFieldColumn { FieldName="GradeID", HeaderText="年级", Align=AlignStyle.Center, Width=0.1 }
  64. },
  65. IsCheckOnSelect = true,
  66. DataSourceUrl = Url.Content("~/Grademajor/GradeBindComboGridOptions"),
  67. IsPagination = true,
  68. IsShowRowNumbers = true,
  69. IsSingleSelect = false,
  70. }
  71. };
  72. //专业名称
  73. ComboGridOptions cgopStandard = new ComboGridOptions
  74. {
  75. TextField = "StandardName",
  76. ValueField = "StandardID",
  77. ID = "DictionaryStandard",
  78. Name = "DictionaryStandard",
  79. OnSelect = "queryStandard",
  80. GridOptions = new DataGridOptions
  81. {
  82. Columns = new List<DataGridColumn>()
  83. {
  84. new BoundFieldColumn { FieldName="StandardCode", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  85. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 }
  86. },
  87. IsCheckOnSelect = true,
  88. DataSourceUrl = Url.Content("~/Grademajor/StandardBindComboGridOptions"),
  89. IsPagination = true,
  90. IsShowRowNumbers = true,
  91. IsSingleSelect = false,
  92. }
  93. };
  94. //学制
  95. ComboGridOptions cgopLearnSystem = new ComboGridOptions
  96. {
  97. TextField = "LearnSystem",
  98. ValueField = "LearnSystem",
  99. ID = "DictionaryLearnSystem",
  100. Name = "DictionaryLearnSystem",
  101. OnSelect = "queryLearnSystem",
  102. GridOptions = new DataGridOptions
  103. {
  104. Columns = new List<DataGridColumn>()
  105. {
  106. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center }
  107. },
  108. IsCheckOnSelect = true,
  109. DataSourceUrl = Url.Content("~/Facultymajor/LearnSystem"),
  110. IsPagination = true,
  111. IsShowRowNumbers = true,
  112. IsSingleSelect = false,
  113. IsShowHeader = false
  114. }
  115. };
  116. //年级专业
  117. ComboGridOptions cgopGrademajor = new ComboGridOptions
  118. {
  119. TextField = "Name",
  120. ValueField = "GrademajorID",
  121. Name = "GrademajorComboGrid",
  122. ID = "GrademajorComboGrid",
  123. OnSelect = "queryGrademajor",
  124. GridOptions = new DataGridOptions
  125. {
  126. Columns = new List<DataGridColumn>()
  127. {
  128. new LinkButtonColumn { FieldName="Code", HeaderText="年级专业代码", Align=AlignStyle.Center, Width=0.2 },
  129. new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.3 }
  130. },
  131. PageSize = 5,
  132. IsCheckOnSelect = true,
  133. DataSourceUrl = Url.Content("~/Grademajor/List"),
  134. IsPagination = true,
  135. IsShowRowNumbers = true,
  136. IsSingleSelect = false
  137. }
  138. };
  139. //班级信息
  140. ComboGridOptions cgopClassmajor = new ComboGridOptions
  141. {
  142. TextField = "Name",
  143. ValueField = "ClassmajorID",
  144. GridOptions = new DataGridOptions
  145. {
  146. Columns = new List<DataGridColumn>()
  147. {
  148. new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Width=0.25, Align=AlignStyle.Center },
  149. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Width=0.5, Align=AlignStyle.Center }
  150. },
  151. PageSize = 5,
  152. IsCheckOnSelect = true,
  153. DataSourceUrl = Url.Content("~/Classmajor/List"),
  154. IsPagination = true,
  155. IsShowRowNumbers = true,
  156. IsSingleSelect = false
  157. }
  158. };
  159. }
  160. @section scripts{
  161. <script src="~/Scripts/Business/EnrollManage/NewStudentManage/NewStudentEnterAssignClass.js" type="text/javascript"></script>
  162. <script type="text/javascript">
  163. var nonSelect = "@DropdownList.SELECT_ALL";
  164. //加载选择的录取名单ID
  165. $(function () {
  166. var newStudentIDs = top.$("#@(Request["WindowID"])").data("inputData").join(',');
  167. $("#newStudentIDs").val(newStudentIDs);
  168. });
  169. //联动查询
  170. function queryCampus(data) {
  171. var campusID = $("#CampusDropdown").combogridX("getValue");
  172. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@@|'})";
  173. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  174. queryClass();
  175. }
  176. function queryCollege(data) {
  177. var campusID = $("#CampusDropdown").combogridX("getValue");
  178. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  179. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@@|";
  180. jsonString += "CollegeDropdown|*|" + collegeID + "|@@|'})";
  181. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  182. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  183. queryClass();
  184. }
  185. function queryGrade(data) {
  186. queryClass();
  187. }
  188. function queryStandard(data) {
  189. queryClass();
  190. }
  191. function queryEducation(data) {
  192. queryClass();
  193. }
  194. function queryLearningform(data) {
  195. queryClass();
  196. }
  197. function queryLearnSystem(data) {
  198. queryClass();
  199. }
  200. function queryGrademajor(data) {
  201. queryClass();
  202. }
  203. function queryClass() {
  204. var jsonString = "";
  205. var parameterString = "";
  206. var campusID = $("#CampusDropdown").combogridX("getValue");
  207. var collegeID = $("#CollegeDropdown").combogridX("getValue");
  208. var gradeID = $("#DictionaryGrade").combogridX("getValue");
  209. var standardID = $("#DictionaryStandard").combogridX("getValue");
  210. var educationID = $("#DictionaryEducation").combogridX("getValue");
  211. var learningformID = $("#DictionaryLearningform").combogridX("getValue");
  212. var learnSystem = $("#DictionaryLearnSystem").combogridX("getValue");
  213. //年级专业
  214. var grademajorID = $("#GrademajorComboGrid").combogridX("getValue");
  215. if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@@|";
  216. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@@|";
  217. if (gradeID != nonSelect) parameterString += "DictionaryGrade|*|" + gradeID + "|@@|";
  218. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@@|";
  219. if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@@|";
  220. if (learningformID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningformID + "|@@|";
  221. if (learnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + learnSystem + "|@@|";
  222. //年级专业
  223. if (grademajorID != nonSelect) parameterString += "GrademajorComboGrid|*|" + grademajorID + "|@@|";
  224. if (parameterString != "") {
  225. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  226. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  227. $("#GrademajorComboGrid").combogridX("reload", eval(jsonString));
  228. $("#ClassmajorID").combogridX("reload", eval(jsonString));
  229. }
  230. else {
  231. $("#DictionaryStandard").combogridX("reload");
  232. $("#GrademajorComboGrid").combogridX("reload");
  233. $("#ClassmajorID").combogridX("reload");
  234. }
  235. }
  236. </script>
  237. }
  238. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  239. @using (Ajax.BeginForm(new AjaxOptions
  240. {
  241. //生成成功后不关闭弹出页面
  242. OnSuccess = "EMISFunction.FormSuccessNoClose",
  243. OnBegin = "EMISFunction.FormSubmit",
  244. OnComplete = "EMISFunction.FormComplete"
  245. }))
  246. {
  247. <div class="p_title">
  248. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  249. </div>
  250. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Create")</div>
  251. </div>
  252. <div class="search_keyword">
  253. @Html.Hidden("newStudentIDs")
  254. <div class="search_input">
  255. <ul>
  256. <li class="sn" style="padding-left: 5px;width: 65px;">@EMIS.Utility.RSL.Get("Campus"):</li>
  257. <li class="sv">
  258. @Html.ComboGrid(cgopCampus)
  259. </li>
  260. <li class="sn" style="padding-left: 5px;width: 65px;">@EMIS.Utility.RSL.Get("College"):</li>
  261. <li class="sv">
  262. @Html.ComboGrid(cgopCollege)
  263. </li>
  264. <li class="sn" style="padding-left: 5px;width: 65px;">年级:</li>
  265. <li class="sv">
  266. @*@Html.ComboGrid(cgopGrade)*@
  267. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Grade, DropdownListBindType.SelectAll,
  268. new ComboGridOptions
  269. {
  270. ID = "DictionaryGrade",
  271. Name = "DictionaryGrade",
  272. OnSelect = "queryGrade"
  273. })
  274. </li>
  275. </ul>
  276. <ul>
  277. <li class="sn" style="padding-left: 5px;width: 65px;">专业名称:</li>
  278. <li class="sv">
  279. @Html.ComboGrid(cgopStandard)
  280. </li>
  281. <li class="sn" style="padding-left: 5px;width: 65px;">@Html.RSLabel("EducationID"):</li>
  282. <li class="sv">
  283. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Education, DropdownListBindType.SelectAll,
  284. new ComboGridOptions()
  285. {
  286. ID = "DictionaryEducation",
  287. Name = "DictionaryEducation",
  288. OnSelect = "queryEducation"
  289. })
  290. </li>
  291. <li class="sn" style="padding-left: 5px;width: 65px;">学习形式:</li>
  292. <li class="sv">
  293. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Learningform, DropdownListBindType.SelectAll,
  294. new ComboGridOptions()
  295. {
  296. ID = "DictionaryLearningform",
  297. Name = "DictionaryLearningform",
  298. OnSelect = "queryLearningform"
  299. })
  300. </li>
  301. </ul>
  302. <ul>
  303. <li class="sn" style="padding-left: 5px;width: 65px;">学制:</li>
  304. <li class="sv">
  305. @Html.ComboGrid(cgopLearnSystem)
  306. </li>
  307. <li class="sn" style="padding-left: 5px;color: red;width: 65px;">年级专业:</li>
  308. <li class="sv">
  309. @Html.ComboGrid(cgopGrademajor)
  310. </li>
  311. <li class="sn" style="padding-left: 5px;color: red;width: 65px;">班级信息:</li>
  312. <li class="sv">
  313. @Html.ComboGridFor(x => x.ClassmajorID, cgopClassmajor)
  314. </li>
  315. </ul>
  316. </div>
  317. </div>
  318. }
  319. </div>