GrademajorList.cshtml 4.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "GrademajorList";
  5. Guid? facultymajorID = new Guid(Request["facultymajorID"]);
  6. int? inschoolstatus = Convert.ToInt32(Request["inschoolstatus"] == null ? "-1" : Request["inschoolstatus"]);
  7. }
  8. @section scripts{
  9. <script type="text/javascript">
  10. var nonSelect = "@DropdownList.SELECT_ALL";
  11. //刷新
  12. function reload() {
  13. $("#dgGrademajorList").cmsXDataTable("load", $.getDataGridParams("dgGrademajorList"));
  14. }
  15. //设置列颜色为红色
  16. function SetRedColumn(index, row, value) {
  17. return " <span style=\"color: red;\">" + value + "</span>";
  18. }
  19. //Excel导出
  20. function FacultymajorGr_DetailExport() {
  21. $("#formQuery").submit();
  22. }
  23. </script>
  24. }
  25. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  26. <form id="formQuery" method="post" action="@Url.Content("~/Facultymajor/Excel_Grademajor?facultymajorID=" + facultymajorID)">
  27. @Html.PositionCondition("FacultymajorGrademajor")
  28. <div class="search_keyword">
  29. <div class="search_input">
  30. <ul>
  31. <li class="sn" style="padding-left: 5px;">年级:</li>
  32. <li class="sv">
  33. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Grade, DropdownListBindType.SelectAll,
  34. new ComboGridOptions
  35. {
  36. ID = "DictionaryGrade",
  37. Name = "DictionaryGrade",
  38. OnSelect = "reload"
  39. }, new Dictionary<string, string> { { "data-condition", "dgGrademajorList" } })
  40. </li>
  41. <li class="sn" style="padding-left: 5px;">入学学期:</li>
  42. <li class="sv">
  43. @Html.DictionaryComboGrid(EMIS.ViewModel.DictionaryItem.CF_Semester, DropdownListBindType.SelectAll,
  44. new ComboGridOptions
  45. {
  46. ID = "DictionarySemester",
  47. Name = "DictionarySemester",
  48. OnSelect = "reload"
  49. }, new Dictionary<string, string> { { "data-condition", "dgGrademajorList" } })
  50. </li>
  51. <li class="sn" style="padding-left: 5px;color: red;">在校状态:</li>
  52. <li class="sv">
  53. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_INOrOutSchoolStatus, new DropdownListOptions
  54. {
  55. ID = "DictionaryInschoolStatus",
  56. Name = "DictionaryInschoolStatus",
  57. BindType = DropdownListBindType.SelectAll,
  58. OnSelect = "reload",
  59. SelectedValue = (int)inschoolstatus
  60. }, new Dictionary<string, string> { { "data-condition", "dgGrademajorList" } })
  61. </li>
  62. </ul>
  63. </div>
  64. </div>
  65. <div class="p_title">
  66. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  67. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("GrDetail")</div>
  68. </div>
  69. </form>
  70. <div class="search_list">
  71. @Html.DataGrid(new DataGridOptions
  72. {
  73. Columns = new List<DataGridColumn>()
  74. {
  75. new CheckBoxFieldColumn{ HeaderText="", FieldName="GrademajorID" },
  76. new BoundFieldColumn { FieldName="Code", HeaderText="年级专业编号", Align=AlignStyle.Center, Width=0.1 },
  77. new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.15 },
  78. new BoundFieldColumn { FieldName="GradeID", HeaderText="年级", Align=AlignStyle.Center, OrderFieldName="GradeID", Width=0.03, CustomFormatFun="SetRedColumn" },
  79. new BoundFieldColumn { FieldName="SemesterName", HeaderText="入学学期", Align=AlignStyle.Center, OrderFieldName="SemesterID", Width=0.04 },
  80. new BoundFieldColumn { FieldName="GraduateSchoolyearCode", HeaderText="毕业学期", Align=AlignStyle.Center, Width=0.08 },
  81. new BoundFieldColumn { FieldName="StudentCount", HeaderText="人数", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" }
  82. },
  83. IsPostBack = true,
  84. IsCheckOnSelect = true,
  85. DataSourceUrl = Url.Content("~/Facultymajor/GrademajorList?facultymajorID=" + facultymajorID),
  86. ID = "dgGrademajorList",
  87. IsPagination = true,
  88. IsShowRowNumbers = true,
  89. IsSingleSelect = false
  90. })
  91. </div>
  92. </div>