FacultymajorList.cshtml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "FacultymajorList";
  5. Guid? collegeID = new Guid(Request["collegeID"]);
  6. //学制
  7. ComboGridOptions cgopLearnSystem = new ComboGridOptions
  8. {
  9. TextField = "LearnSystem",
  10. ValueField = "LearnSystem",
  11. ID = "DictionaryLearnSystem",
  12. Name = "DictionaryLearnSystem",
  13. OnSelect = "reload",
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center }
  19. },
  20. IsCheckOnSelect = true,
  21. DataSourceUrl = Url.Content("~/Specialty/LearnSystem"),
  22. IsPagination = true,
  23. IsShowRowNumbers = true,
  24. IsSingleSelect = false,
  25. IsShowHeader = false
  26. }
  27. };
  28. }
  29. @section scripts{
  30. <script type="text/javascript">
  31. var nonSelect = "@DropdownList.SELECT_ALL";
  32. //刷新
  33. function reload() {
  34. $("#dgFacultymajorList").cmsXDataTable("load", $.getDataGridParams("dgFacultymajorList"));
  35. }
  36. //设置列颜色为红色
  37. function SetRedColumn(index, row, value) {
  38. return " <span style=\"color: red;\">" + value + "</span>";
  39. }
  40. //Excel导出
  41. function CollegeFacultymajor_DetailExport() {
  42. $("#formQuery").submit();
  43. }
  44. </script>
  45. }
  46. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  47. <form id="formQuery" method="post" action="@Url.Content("~/College/FacultymajorListExcel?collegeID=" + collegeID)">
  48. @Html.PositionCondition("CollegeFacultymajor")
  49. <div class="search_keyword">
  50. <div class="search_input">
  51. <ul>
  52. <li class="sn" style="padding-left: 5px;">专业名称:</li>
  53. <li class="sv">
  54. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Standard, DropdownListBindType.SelectAll,
  55. new ComboGridOptions
  56. {
  57. ID = "DictionaryStandard",
  58. Name = "DictionaryStandard",
  59. OnSelect = "reload",
  60. GridOptions = new DataGridOptions
  61. {
  62. Columns = new List<DataGridColumn>()
  63. {
  64. new BoundFieldColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.06 },
  65. new BoundFieldColumn { FieldName="Name", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.1 }
  66. }
  67. }
  68. }, new Dictionary<string, string> { { "data-condition", "dgFacultymajorList" } })
  69. </li>
  70. <li class="sn" style="padding-left: 5px;">@Html.RSLabel("EducationID"):</li>
  71. <li class="sv">
  72. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Education, DropdownListBindType.SelectAll,
  73. new ComboGridOptions
  74. {
  75. ID = "DictionaryEducation",
  76. Name = "DictionaryEducation",
  77. OnSelect = "reload"
  78. },
  79. new Dictionary<string, string> { { "data-condition", "dgFacultymajorList" } })
  80. </li>
  81. <li class="sn" style="padding-left: 5px;">学习形式:</li>
  82. <li class="sv">
  83. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Learningform, DropdownListBindType.SelectAll,
  84. new ComboGridOptions
  85. {
  86. ID = "DictionaryLearningform",
  87. Name = "DictionaryLearningform",
  88. OnSelect = "reload"
  89. },
  90. new Dictionary<string, string> { { "data-condition", "dgFacultymajorList" } })
  91. </li>
  92. </ul>
  93. <ul>
  94. <li class="sn" style="padding-left: 5px;">学制:</li>
  95. <li class="sv">
  96. @Html.ComboGrid(cgopLearnSystem, new Dictionary<string, string> { { "data-condition", "dgFacultymajorList" } })
  97. </li>
  98. <li class="sn" style="padding-left: 5px;">专业科类:</li>
  99. <li class="sv">
  100. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Scienceclass, DropdownListBindType.SelectAll,
  101. new ComboGridOptions
  102. {
  103. ID = "DictionaryScienceclass",
  104. Name = "DictionaryScienceclass",
  105. OnSelect = "reload"
  106. },
  107. new Dictionary<string, string> { { "data-condition", "dgFacultymajorList" } })
  108. </li>
  109. <li class="sn" style="padding-left: 5px;color:red;">在校状态:</li>
  110. <li class="sv">
  111. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_INOrOutSchoolStatus, new DropdownListOptions
  112. {
  113. ID = "DictionaryInschoolStatus",
  114. Name = "DictionaryInschoolStatus",
  115. BindType = DropdownListBindType.SelectAll,
  116. //SelectedValue = (int)EMIS.ViewModel.CF_INOrOutSchoolStatus.Yes,
  117. OnSelect = "reload"
  118. },
  119. new Dictionary<string, string> { { "data-condition", "dgFacultymajorList" } })
  120. </li>
  121. </ul>
  122. </div>
  123. </div>
  124. <div class="p_title">
  125. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  126. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("FaDetail")</div>
  127. </div>
  128. </form>
  129. <div class="search_list">
  130. @Html.DataGrid(new DataGridOptions
  131. {
  132. Columns = new List<DataGridColumn>()
  133. {
  134. new CheckBoxFieldColumn{ HeaderText="", FieldName="FacultymajorID" },
  135. new BoundFieldColumn { FieldName="Code", HeaderText="院系专业编号", Align=AlignStyle.Center, Width=0.06 },
  136. new BoundFieldColumn { FieldName="Name", HeaderText="院系专业名称", Align=AlignStyle.Center, Width=0.08 },
  137. new BoundFieldColumn { FieldName="StandardCode", HeaderText="专业代码", Align=AlignStyle.Center, OrderFieldName="StandardID", Width=0.06 },
  138. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.06 },
  139. new BoundFieldColumn { FieldName="EducationName", HeaderText=EMIS.Utility.RSL.Get("EducationID"), Align=AlignStyle.Center, OrderFieldName="EducationID", Width=0.05 },
  140. new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Align=AlignStyle.Center, OrderFieldName="LearningformID", Width=0.05 },
  141. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center, Width=0.03 },
  142. new BoundFieldColumn { FieldName="ScienceclassName", HeaderText="专业科类", Align=AlignStyle.Center, OrderFieldName="ScienceclassID", Width=0.05 },
  143. //new BoundFieldColumn { FieldName="CollegeCode", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center, Width=0.05 },
  144. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  145. new BoundFieldColumn { FieldName="GrademajorCount", HeaderText="年级专业数", Align=AlignStyle.Center, Width=0.05, CustomFormatFun="SetRedColumn" },
  146. new BoundFieldColumn { FieldName="StudentCount", HeaderText="人数", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" }
  147. //new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.03 }
  148. },
  149. IsPostBack = true,
  150. IsCheckOnSelect = true,
  151. DataSourceUrl = Url.Content("~/College/FacultymajorList?collegeID=" + collegeID),
  152. ID = "dgFacultymajorList",
  153. IsPagination = true,
  154. IsShowRowNumbers = true,
  155. IsSingleSelect = false
  156. })
  157. </div>
  158. </div>