List.cshtml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMISOnline.Entities;
  3. @using EMISOnline.Web.Controls;
  4. @{
  5. ViewBag.Title = "List";
  6. }
  7. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  8. @Html.Position()
  9. <div class="p_SearchTitle">
  10. <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
  11. 查询条件</div>
  12. </div>
  13. @using (Html.BeginForm("", "", FormMethod.Post, new { id = "fm" }))
  14. {
  15. <div class="search_keyword">
  16. <div class="search_input">
  17. <ul>
  18. <li class="sn" style="padding-left: 5px;">状态:</li>
  19. <li class="sv">
  20. @Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/Common/DictionaryDropDown?dictionaryCode=CF_STUDENTSTATUS"), ID = "StudentStatus", Name = "StudentStatus", OnSelect = "loadGrid" }, new Dictionary<string, string> { { "data-condition", "dgList" } })
  21. </li>
  22. <li class="sn" style="padding-left: 5px;">入学学年学期:</li>
  23. <li class="sv">
  24. @Html.TextBox("Schoolyear")
  25. </li>
  26. <li class="sn" style="padding-left: 5px;">专业:</li>
  27. <li class="sv">
  28. @Html.TextBox("StandardName")
  29. </li>
  30. <li>
  31. @Html.Button(new ButtonOptions() { ID = "btnSearch", Text = "查 询" })
  32. </li>
  33. </ul>
  34. <ul>
  35. <li class="sn" style="padding-left: 5px;">学号:</li>
  36. <li class="sv">
  37. @Html.TextBox("LoginID")
  38. </li>
  39. <li class="sn" style="padding-left: 5px;">姓名:</li>
  40. <li class="sv">
  41. @Html.TextBox("Name")
  42. </li>
  43. </ul>
  44. </div>
  45. </div>
  46. }
  47. <div class="search_list">
  48. @Html.DataGrid(new DataGridOptions
  49. {
  50. Columns = new List<DataGridColumn>()
  51. {
  52. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID"},
  53. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center},
  54. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center },
  55. new BoundFieldColumn { FieldName="CollegeName", HeaderText="院系所", Align=AlignStyle.Center},
  56. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业", Align=AlignStyle.Center , },
  57. new BoundFieldColumn { FieldName="SchoolyearName", HeaderText="入学学年学期", Align=AlignStyle.Center , },
  58. new BoundFieldColumn { FieldName="StudentStatusName", HeaderText="状态", Align=AlignStyle.Center},
  59. },
  60. IsCheckOnSelect = true,
  61. DataSourceUrl = Url.Content("~/Students/List"),
  62. ID = "dgList",
  63. IsPagination = true,
  64. IsShowRowNumbers = true,
  65. IsSingleSelect = false,
  66. IsVerticalExpand = true,
  67. IsAutoHeight = false,
  68. PageSize = 15
  69. })
  70. </div>
  71. </div>
  72. <script type="text/javascript">
  73. $(function () {
  74. $("#btnSearch").click(function () {
  75. loadGrid();
  76. });
  77. });
  78. function loadGrid() {
  79. var queryForm = $("#fm").getFormData();
  80. $("#dgList").cmsXDataTable("load", queryForm);
  81. }
  82. </script>