AddGrademajorList.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "AddGrademajorList";
  5. string schoolYear = ViewBag.SchoolYearID;
  6. ComboGridOptions cgop = new ComboGridOptions
  7. {
  8. TextField = "Name",
  9. ValueField = "CampusID",
  10. OnSelect = "reload",
  11. Name = "CampusDropdown",
  12. ID = "CampusDropdown",
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. // new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CampusCode"), Align=AlignStyle.Center },
  18. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CampusName"), Align=AlignStyle.Center }
  19. },
  20. IsCheckOnSelect = true,
  21. DataSourceUrl = Url.Content("~/Campus/List"),
  22. IsPagination = true,
  23. IsShowRowNumbers = true,
  24. IsSingleSelect = false,
  25. }
  26. };
  27. ComboGridOptions cgopCollege = new ComboGridOptions
  28. {
  29. TextField = "Name",
  30. ValueField = "CollegeID",
  31. OnSelect = "reload",
  32. Name = "CollegeDropdown",
  33. ID = "CollegeDropdown",
  34. GridOptions = new DataGridOptions
  35. {
  36. Columns = new List<DataGridColumn>()
  37. {
  38. // new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center },
  39. new BoundFieldColumn { FieldName="Name", HeaderText=@EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center }
  40. },
  41. IsCheckOnSelect = true,
  42. DataSourceUrl = Url.Content("~/College/ListOnlyCollege"),
  43. IsPagination = true,
  44. IsShowRowNumbers = true,
  45. IsSingleSelect = false,
  46. }
  47. };
  48. ComboGridOptions cgopStandard = new ComboGridOptions
  49. {
  50. TextField = "StandardName",
  51. ValueField = "StandardID",
  52. OnSelect = "reload",
  53. Name = "DictionaryStandard",
  54. ID = "DictionaryStandard",
  55. GridOptions = new DataGridOptions
  56. {
  57. Columns = new List<DataGridColumn>()
  58. {
  59. new BoundFieldColumn { FieldName="StandardCode", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.06 },
  60. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.1 }
  61. },
  62. IsCheckOnSelect = true,
  63. DataSourceUrl = Url.Content("~/Grademajor/StandardBindComboGridOptions"),
  64. IsPagination = true,
  65. IsShowRowNumbers = true,
  66. IsSingleSelect = false,
  67. IsShowHeader = false
  68. }
  69. };
  70. ComboGridOptions cgopLearnSystem = new ComboGridOptions
  71. {
  72. TextField = "LearnSystem",
  73. ValueField = "LearnSystem",
  74. OnSelect = "reload",
  75. Name = "DictionaryLearnSystem",
  76. ID = "DictionaryLearnSystem",
  77. GridOptions = new DataGridOptions
  78. {
  79. Columns = new List<DataGridColumn>()
  80. {
  81. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center }
  82. },
  83. IsCheckOnSelect = true,
  84. DataSourceUrl = Url.Content("~/Specialty/LearnSystem"),
  85. IsPagination = true,
  86. IsShowRowNumbers = true,
  87. IsSingleSelect = false,
  88. IsShowHeader = false
  89. }
  90. };
  91. }
  92. @section scripts{
  93. <script type="text/javascript">
  94. var nonSelect = "@DropdownList.SELECT_ALL";
  95. function reload() {
  96. $("#dgGrademajorList").cmsXDataTable("load", $.getDataGridParams("dgGrademajorList"));
  97. }
  98. //获取选中的数据
  99. function validChoose() {
  100. var d = [];
  101. $.each($("#dgGrademajorList").cmsXDataTable("getSelections"), function (index) {
  102. d.push(this);
  103. });
  104. return d;
  105. }
  106. function Grademajor_Confirm() {
  107. var d = validChoose();
  108. var windowID = $.SystemGeneral.getUrlParam("WindowID");
  109. if (d.length == 0) {
  110. $.messager.alert("系统提示", "请选年级专业。");
  111. return;
  112. }
  113. top.$("#" + windowID).data("resultData", d);
  114. top.$("#" + windowID).dialog("close");
  115. }
  116. </script>
  117. }
  118. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  119. <div class="p_SearchTitle">
  120. <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
  121. 查询条件
  122. </div>
  123. </div>
  124. <form id="formQuery" method="post" action="@Url.Content("~/Grademajor/Excel")">
  125. <div class="search_keyword">
  126. <div class="search_input">
  127. <ul>
  128. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("Campus"):</li>
  129. <li class="sv">
  130. @Html.ComboGrid(cgop, new Dictionary<string, string> { { "data-condition", "dgGrademajorList" } })
  131. </li>
  132. <li class="sn" style="padding-left: 5px;">@EMIS.Utility.RSL.Get("College"):</li>
  133. <li class="sv">
  134. @Html.ComboGrid(cgopCollege, new Dictionary<string, string> { { "data-condition", "dgGrademajorList" } })
  135. </li>
  136. <li class="sn" style="padding-left: 5px;">年级:</li>
  137. <li class="sv">
  138. @Html.SchoolYearDropDownList(new DropdownListOptions { ID = "DictionarySchoolyear", Name = "DictionarySchoolyear", BindType = DropdownListBindType.SelectAll, OnSelect = "reload", SelectedValue = BaseExtensions.GetCurrentYearID() }, new Dictionary<string, string> { { "data-condition", "dgGrademajorList" } })
  139. </li>
  140. <li class="sn" style="padding-left: 5px;">专业名称:</li>
  141. <li class="sv">
  142. @Html.ComboGrid(cgopStandard, new Dictionary<string, string> { { "data-condition", "dgGrademajorList" } })
  143. @*@Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ID = "DictionaryStandard", Name = "DictionaryStandard", OnSelect = "QueryStandardDropdownList", ItemSourceUrl = Url.Content("~/Facultymajor/Standard") }, new Dictionary<string, string> { { "data-condition", "dgFacultymajorList" } })*@
  144. </li>
  145. </ul>
  146. <ul>
  147. <li class="sn" style="padding-left: 5px;">@Html.RSLabel("EducationID"):</li>
  148. <li class="sv">
  149. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_Education, new DropdownListOptions { Name = "DictionaryEducation", BindType = DropdownListBindType.SelectAll, OnSelect = "reload" }, new Dictionary<string, string> { { "data-condition", "dgGrademajorList" } })
  150. </li>
  151. <li class="sn" style="padding-left: 5px;">学习形式:</li>
  152. <li class="sv">
  153. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_Learningform, new DropdownListOptions { Name = "DictionaryLearningform", BindType = DropdownListBindType.SelectAll, OnSelect = "reload" }, new Dictionary<string, string> { { "data-condition", "dgGrademajorList" } })
  154. </li>
  155. <li class="sn" style="padding-left: 5px;">学制:</li>
  156. <li class="sv">
  157. @Html.ComboGrid(cgopLearnSystem, new Dictionary<string, string> { { "data-condition", "dgGrademajorList" } })
  158. </li>
  159. </ul>
  160. </div>
  161. </div>
  162. </form>
  163. <div class="p_title">
  164. <div class="current_navbar toolbar">
  165. <div class="func_info">
  166. <a class="easyui-linkbutton" href="javascript:Grademajor_Confirm()" data-options="iconCls:'icon-ok',plain:'true'"
  167. onfocus="this.blur()">选中</a>
  168. </div>
  169. </div>
  170. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  171. </div>
  172. <div class="search_list">
  173. @Html.DataGrid(new DataGridOptions
  174. {
  175. Columns = new List<DataGridColumn>()
  176. {
  177. new CheckBoxFieldColumn{ HeaderText="", FieldName="GrademajorID" },
  178. new LinkButtonColumn { FieldName="Code", HeaderText="年级专业编号", Align=AlignStyle.Center , Handle="edit", Width=0.08 },
  179. new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.12 },
  180. //new BoundFieldColumn { FieldName="FacultymajorName", HeaderText="院系专业名称", Align=AlignStyle.Center, Width=0.1 },
  181. new BoundFieldColumn { FieldName="SchoolyearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.03 },
  182. new BoundFieldColumn { FieldName="StandardCode", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.06 },
  183. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.08 },
  184. new BoundFieldColumn { FieldName="EducationName", HeaderText=EMIS.Utility.RSL.Get("EducationID"), Align=AlignStyle.Center, Width=0.04 },
  185. new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Align=AlignStyle.Center, Width=0.05 },
  186. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center, Width=0.03 },
  187. new BoundFieldColumn { FieldName="SchoolcodeName", HeaderText="入学学期", Align=AlignStyle.Center, Width=0.04 },
  188. new BoundFieldColumn { FieldName="GraduatingSemesterCode", HeaderText="毕业学期", Align=AlignStyle.Center, Width=0.08 },
  189. new BoundFieldColumn { FieldName="CollegeCode", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.05 },
  190. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.1 },
  191. new LinkButtonColumn { FieldName="StudentCount", HeaderText="人数", Align=AlignStyle.Center, Handle="editStudentCount", Width=0.03 }
  192. //new BoundFieldColumn { FieldName="Remarks", HeaderText="备注", Align=AlignStyle.Center, Width=0.03 }
  193. },
  194. IsCheckOnSelect = true,
  195. DataSourceUrl = Url.Content("~/EvaluationOpenControl/AddGrademajorList?SchoolYearID=" + schoolYear),
  196. ID = "dgGrademajorList",
  197. IsPagination = true,
  198. IsShowRowNumbers = true,
  199. IsSingleSelect = false
  200. })
  201. </div>
  202. </div>