List.cshtml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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.TextBox("CourseName")
  21. </li>
  22. <li>
  23. @Html.Button(new ButtonOptions() { ID = "btnSearch", Text = "查 询" })
  24. </li>
  25. </ul>
  26. </div>
  27. </div>
  28. }
  29. <div class="search_list">
  30. @Html.DataGrid(new DataGridOptions
  31. {
  32. Columns = new List<DataGridColumn>()
  33. {
  34. new CheckBoxFieldColumn{ HeaderText="", FieldName="CoursematerialID" },
  35. new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center , Handle="edit", Width=0.06 },
  36. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, OverflowLength=20, Width=0.1 },
  37. new BoundFieldColumn { FieldName="Abbreviation", HeaderText="课程简称", Align=AlignStyle.Center, OverflowLength=8, Width=0.08 },
  38. new BoundFieldColumn { FieldName="CourseLevelName", HeaderText="课程级别", Align=AlignStyle.Center, Width=0.03 },
  39. new BoundFieldColumn { FieldName="CourseScienceName", HeaderText="课程科类", Align=AlignStyle.Center, Width=0.03 },
  40. new BoundFieldColumn { FieldName="IsEnableName", HeaderText="是否启用", Align=AlignStyle.Center, Width=0.03 }
  41. },
  42. IsCheckOnSelect = true,
  43. DataSourceUrl = Url.Content("~/Course/List"),
  44. ID = "dgList",
  45. IsPagination = true,
  46. IsShowRowNumbers = true,
  47. IsSingleSelect = false,
  48. IsVerticalExpand = true,
  49. IsAutoHeight = false,
  50. PageSize = 15
  51. })
  52. </div>
  53. </div>
  54. <script type="text/javascript">
  55. $(function () {
  56. $("#btnSearch").click(function () {
  57. loadGrid();
  58. });
  59. });
  60. function loadGrid() {
  61. var queryForm = $("#fm").getFormData();
  62. $("#dgList").cmsXDataTable("load", queryForm);
  63. }
  64. </script>