SpecialtyPlanList.cshtml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "SpecialtyPlanList";
  5. Guid? graduationApplyID = new Guid(Request["graduationApplyID"]);
  6. }
  7. @section scripts{
  8. <script type="text/javascript">
  9. var nonSelect = "@DropdownList.SELECT_ALL";
  10. //刷新
  11. function reload() {
  12. $("#dgSpecialtyPlanList").cmsXDataTable("load", $.getDataGridParams("dgSpecialtyPlanList"));
  13. }
  14. //设置列颜色为红色
  15. function SetRedColumn(index, row, value) {
  16. return " <span style=\"color: red;\">" + value + "</span>";
  17. }
  18. //设置相应的行颜色为红色
  19. function SetRedGrid(rowIndex, rowData) {
  20. if (true) {
  21. return "color: red;";
  22. } else {
  23. return "";
  24. }
  25. }
  26. //Excel导出
  27. function SpecialtyPlanListExcel() {
  28. $("#formQuery").submit();
  29. }
  30. </script>
  31. }
  32. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  33. <form id="formQuery" method="post" action="@Url.Content("~/GraduationApply/SpecialtyPlanListExcel?graduationApplyID=" + graduationApplyID)">
  34. @Html.PositionCondition("SpecialtyPlanGraduationApply")
  35. <div class="search_keyword">
  36. <div class="search_input">
  37. <ul>
  38. <li class="sn" style="padding-left: 5px;">学年学期:</li>
  39. <li class="sv">
  40. @Html.DropdownList(new DropdownListOptions
  41. {
  42. ID = "SchoolyearDropdown",
  43. Name = "SchoolyearDropdown",
  44. BindType = DropdownListBindType.SelectAll,
  45. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"),
  46. OnSelect = "reload"
  47. }, new Dictionary<string, string> { { "data-condition", "dgSpecialtyPlanList" } })
  48. </li>
  49. <li class="sn" style="padding-left: 5px;">课程类型:</li>
  50. <li class="sv">
  51. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_CourseType, DropdownListBindType.SelectAll,
  52. new ComboGridOptions
  53. {
  54. ID = "DictionaryCourseType",
  55. Name = "DictionaryCourseType",
  56. OnSelect = "reload"
  57. }, new Dictionary<string, string> { { "data-condition", "dgSpecialtyPlanList" } })
  58. </li>
  59. </ul>
  60. <ul>
  61. <li class="sn" style="padding-left: 5px;">开课学期:</li>
  62. <li class="sv">
  63. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Startterm, DropdownListBindType.SelectAll,
  64. new ComboGridOptions
  65. {
  66. ID = "DictionaryStartterm",
  67. Name = "DictionaryStartterm",
  68. OnSelect = "reload"
  69. }, new Dictionary<string, string> { { "data-condition", "dgSpecialtyPlanList" } })
  70. </li>
  71. <li class="sn" style="padding-left: 5px;color:red;">学位课程:</li>
  72. <li class="sv">
  73. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions()
  74. {
  75. BindType = DropdownListBindType.SelectAll,
  76. ID = "DictionaryIsMainCourse",
  77. Name = "DictionaryIsMainCourse",
  78. //SelectedValue = (int)EMIS.ViewModel.CF_GeneralPurpose.IsYes,
  79. OnSelect = "reload"
  80. }, new Dictionary<string, string> { { "data-condition", "dgSpecialtyPlanList" } })
  81. </li>
  82. <li class="sn" style="padding-left: 5px;color:red;">处理方式:</li>
  83. <li class="sv">
  84. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_HandleMode, new DropdownListOptions()
  85. {
  86. BindType = DropdownListBindType.SelectAll,
  87. ID = "DictionaryHandleMode",
  88. Name = "DictionaryHandleMode",
  89. //SelectedValue = (int)EMIS.ViewModel.CF_HandleMode.RequiredCourse,
  90. OnSelect = "reload"
  91. }, new Dictionary<string, string> { { "data-condition", "dgSpecialtyPlanList" } })
  92. </li>
  93. </ul>
  94. </div>
  95. </div>
  96. <div class="p_title">
  97. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  98. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("SPDetail")</div>
  99. </div>
  100. </form>
  101. <div class="search_list">
  102. @Html.DataGrid(new DataGridOptions
  103. {
  104. Columns = new List<DataGridColumn>()
  105. {
  106. new CheckBoxFieldColumn{ HeaderText="", FieldName="SpecialtyPlanID" },
  107. new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.06, OverflowLength=6 },
  108. new BoundFieldColumn { FieldName="SchoolyearCode", HeaderText="学年学期", Align=AlignStyle.Center, Width=0.08 },
  109. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.06 },
  110. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.1, OverflowLength=10 },
  111. new BoundFieldColumn { FieldName="CourseTypeName", HeaderText="课程类型", Align=AlignStyle.Center, OrderFieldName="CourseTypeID", Width=0.05 },
  112. new BoundFieldColumn { FieldName="Credit", HeaderText="课程学分", Align=AlignStyle.Center, Width=0.04 },
  113. new BoundFieldColumn { FieldName="IsMainCourseName", HeaderText="学位课程", OrderFieldName="IsMainCourse", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  114. new BoundFieldColumn { FieldName="StarttermName", HeaderText="开课学期", OrderFieldName="StarttermID", Align=AlignStyle. Center, Width=0.04 },
  115. new BoundFieldColumn { FieldName="Totalhours", HeaderText="总学时", OrderFieldName="Totalhours", Align=AlignStyle.Center, Width=0.03 },
  116. new BoundFieldColumn { FieldName="HandleModeName", HeaderText="处理方式", OrderFieldName="HandleModeID", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  117. new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.03, OverflowLength=3 }
  118. },
  119. IsPostBack = true,
  120. IsCheckOnSelect = true,
  121. DataSourceUrl = Url.Content("~/GraduationApply/SpecialtyPlanList?graduationApplyID=" + graduationApplyID),
  122. ID = "dgSpecialtyPlanList",
  123. IsPagination = true,
  124. IsShowRowNumbers = true,
  125. IsSingleSelect = false
  126. })
  127. </div>
  128. </div>