ClassmajorList.cshtml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "ClassmajorList";
  5. Guid? grademajorID = new Guid(Request["grademajorID"]);
  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. $("#dgClassmajorList").cmsXDataTable("load", $.getDataGridParams("dgClassmajorList"));
  14. }
  15. //设置列颜色为红色
  16. function SetRedColumn(index, row, value) {
  17. return " <span style=\"color: red;\">" + value + "</span>";
  18. }
  19. //Excel导出
  20. function GrademajorCl_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("~/Grademajor/Excel_Classmajor?grademajorID=" + grademajorID + "&DictionaryInschoolStatus=" + inschoolstatus)">
  27. @Html.PositionCondition("GrademajorClassmajor")
  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("ClDetail")</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="ClassmajorID" },
  39. new BoundFieldColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center, Width=0.08 },
  40. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.12 },
  41. new BoundFieldColumn { FieldName="ClassNum", HeaderText="班序", Align=AlignStyle.Center, Width=0.02 },
  42. //new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
  43. new BoundFieldColumn { FieldName="SchoolyearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" },
  44. new BoundFieldColumn { FieldName="GraduatingSemesterCode", HeaderText="毕业学期", Align=AlignStyle.Center, Width=0.08 },
  45. //new BoundFieldColumn { FieldName="AssistantUserName", HeaderText="辅导员", Align=AlignStyle.Center, Width=0.04 },
  46. new BoundFieldColumn { FieldName="UserName", HeaderText="班主任", Align=AlignStyle.Center, Width=0.04 },
  47. new BoundFieldColumn { FieldName="StudentCount", HeaderText="人数", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" }
  48. },
  49. IsPostBack = true,
  50. IsCheckOnSelect = true,
  51. DataSourceUrl = Url.Content("~/Grademajor/ClassmajorList?grademajorID=" + grademajorID + "&DictionaryInschoolStatus=" + inschoolstatus),
  52. ID = "dgClassmajorList",
  53. IsPagination = true,
  54. IsShowRowNumbers = true,
  55. IsSingleSelect = false
  56. })
  57. </div>
  58. </div>