Detail.cshtml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "StudentList";
  5. Guid? grademajorID = new Guid(Request["GrademajorID"]);
  6. int? inschoolStatus = Convert.ToInt32(Request["inschoolStatus"]);
  7. }
  8. @section scripts{
  9. <script src="~/Scripts/Business/GraduationManage/GraduationSetting/GraduationStandard.js" type="text/javascript"></script>
  10. <script type="text/javascript">
  11. var nonSelect = "@DropdownList.SELECT_ALL";
  12. //刷新
  13. function reload() {
  14. $("#dgStudentList").cmsXDataTable("load", $.getDataGridParams("dgStudentList"));
  15. }
  16. //设置列颜色为红色
  17. function SetRedColumn(index, row, value) {
  18. return " <span style=\"color: red;\">" + value + "</span>";
  19. }
  20. //Excel导出
  21. function GrademajorStudent_Export() {
  22. $("#formQuery").submit();
  23. }
  24. </script>
  25. }
  26. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  27. <form id="formQuery" method="post" action="@Url.Content("~/GraduationStandard/GrademajorStudentExcel?grademajorID=" + grademajorID + "&inschoolStatus=" + inschoolStatus)">
  28. @Html.PositionCondition("GraStandardStudent")
  29. <div class="p_title">
  30. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  31. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("GraDetail")</div>
  32. </div>
  33. </form>
  34. <div class="search_list">
  35. @Html.DataGrid(new DataGridOptions
  36. {
  37. Columns = new List<DataGridColumn>()
  38. {
  39. new CheckBoxFieldColumn { FieldName="UserID" },
  40. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center,Width=0.08 },
  41. new BoundFieldColumn { FieldName="UserName", HeaderText="姓名", Align=AlignStyle.Center,Width=0.05 },
  42. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", OrderFieldName="Sex", Align=AlignStyle.Center,Width=0.03 },
  43. new BoundFieldColumn { FieldName="SchoolyearID", HeaderText="年级", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" },
  44. new BoundFieldColumn { FieldName="ClassmajorName", HeaderText="班级名称", Align=AlignStyle.Center,Width=0.1 },
  45. new BoundFieldColumn { FieldName="InSchoolStatusName", HeaderText="在校状态", OrderFieldName="InSchoolStatusID", Align=AlignStyle.Center,Width=0.04, CustomFormatFun="SetRedColumn" },
  46. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="学籍状态", OrderFieldName="StudentStatus", Align=AlignStyle.Center,Width=0.04 }
  47. },
  48. IsCheckOnSelect = true,
  49. DataSourceUrl = Url.Content("~/GraduationStandard/Detail?grademajorID=" + grademajorID + "&inschoolStatus=" + inschoolStatus),
  50. IsPostBack = true,
  51. ID = "dgStudentList",
  52. IsPagination = true,
  53. IsShowRowNumbers = true,
  54. IsSingleSelect = false
  55. })
  56. </div>
  57. </div>