ClassmajorList.cshtml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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"] == null ? "-1" : 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)">
  27. @Html.PositionCondition("GrademajorClassmajor")
  28. <div class="search_keyword">
  29. <div class="search_input">
  30. <ul>
  31. <li class="sn" style="padding-left: 5px;color: red;">在校状态:</li>
  32. <li class="sv">
  33. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_INOrOutSchoolStatus, new DropdownListOptions
  34. {
  35. ID = "DictionaryInschoolStatus",
  36. Name = "DictionaryInschoolStatus",
  37. BindType = DropdownListBindType.SelectAll,
  38. OnSelect = "reload",
  39. SelectedValue = (int)inschoolstatus
  40. }, new Dictionary<string, string> { { "data-condition", "dgClassmajorList" } })
  41. </li>
  42. </ul>
  43. </div>
  44. </div>
  45. <div class="p_title">
  46. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  47. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("ClDetail")</div>
  48. </div>
  49. </form>
  50. <div class="search_list">
  51. @Html.DataGrid(new DataGridOptions
  52. {
  53. Columns = new List<DataGridColumn>()
  54. {
  55. new CheckBoxFieldColumn{ HeaderText="", FieldName="ClassmajorID" },
  56. new BoundFieldColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center, Width=0.08 },
  57. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.12 },
  58. new BoundFieldColumn { FieldName="ClassNum", HeaderText="班序", Align=AlignStyle.Center, Width=0.02 },
  59. //new BoundFieldColumn { FieldName="GrademajorName", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1 },
  60. new BoundFieldColumn { FieldName="GradeID", HeaderText="年级", Align=AlignStyle.Center, OrderFieldName="GradeID", Width=0.03, CustomFormatFun="SetRedColumn" },
  61. new BoundFieldColumn { FieldName="GraduateSchoolyearCode", HeaderText="毕业学期", Align=AlignStyle.Center, Width=0.08 },
  62. //new BoundFieldColumn { FieldName="AssistantUserName", HeaderText="辅导员", Align=AlignStyle.Center, Width=0.04 },
  63. new BoundFieldColumn { FieldName="UserName", HeaderText="班主任", Align=AlignStyle.Center, Width=0.04 },
  64. new BoundFieldColumn { FieldName="StudentCount", HeaderText="人数", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" }
  65. },
  66. IsPostBack = true,
  67. IsCheckOnSelect = true,
  68. DataSourceUrl = Url.Content("~/Grademajor/ClassmajorList?grademajorID=" + grademajorID),
  69. ID = "dgClassmajorList",
  70. IsPagination = true,
  71. IsShowRowNumbers = true,
  72. IsSingleSelect = false
  73. })
  74. </div>
  75. </div>