GrademajorList.cshtml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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"]);
  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 + "&DictionaryInschoolStatus=" + inschoolstatus)">
  27. @Html.PositionCondition("FacultymajorGrademajor")
  28. <div class="p_title">
  29. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  30. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("GrDetail")</div>
  31. </div>
  32. </form>
  33. <div class="search_list">
  34. @Html.DataGrid(new DataGridOptions
  35. {
  36. Columns = new List<DataGridColumn>()
  37. {
  38. new CheckBoxFieldColumn{ HeaderText="", FieldName="GrademajorID" },
  39. new BoundFieldColumn { FieldName="Code", HeaderText="年级专业编号", Align=AlignStyle.Center, Width=0.1 },
  40. new BoundFieldColumn { FieldName="Name", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.15 },
  41. new BoundFieldColumn { FieldName="SchoolyearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" },
  42. new BoundFieldColumn { FieldName="SchoolcodeName", HeaderText="入学学期", Align=AlignStyle.Center, Width=0.04 },
  43. new BoundFieldColumn { FieldName="GraduatingSemesterCode", HeaderText="毕业学期", Align=AlignStyle.Center, Width=0.08 },
  44. new BoundFieldColumn { FieldName="StudentCount", HeaderText="人数", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" }
  45. },
  46. IsPostBack = true,
  47. IsCheckOnSelect = true,
  48. DataSourceUrl = Url.Content("~/Facultymajor/GrademajorList?facultymajorID=" + facultymajorID + "&DictionaryInschoolStatus=" + inschoolstatus),
  49. ID = "dgGrademajorList",
  50. IsPagination = true,
  51. IsShowRowNumbers = true,
  52. IsSingleSelect = false
  53. })
  54. </div>
  55. </div>