List.cshtml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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("CourseVideoName")
  21. </li>
  22. <li class="sn" style="padding-left: 5px;">创建时间:</li>
  23. <li class="sv">
  24. @Html.TextBox(new TextBoxOptions { TextBoxType = TextBoxType.Date, Name = "BeginTime" })
  25. </li>
  26. <li class="sn" style="padding-left: 5px;">至:</li>
  27. <li class="sv">
  28. @Html.TextBox(new TextBoxOptions { TextBoxType = TextBoxType.Date, Name = "EndTime" })
  29. </li>
  30. <li>
  31. @Html.Button(new ButtonOptions() { ID = "btnSearch", Text = "查 询" })
  32. </li>
  33. </ul>
  34. </div>
  35. </div>
  36. }
  37. <div class="search_list">
  38. @Html.DataGrid(new DataGridOptions
  39. {
  40. Columns = new List<DataGridColumn>()
  41. {
  42. new CheckBoxFieldColumn{ HeaderText="", FieldName="CourseVideoID"},
  43. //new LinkButtonColumn { FieldName="GrademajorName", HeaderText="专业名称", Align=AlignStyle.Center},
  44. //new BoundFieldColumn { FieldName="CoursematerialName", HeaderText="课程名称", Align=AlignStyle.Center },
  45. new BoundFieldColumn { FieldName="CourseVideoName", HeaderText="视频标题", Align=AlignStyle.Center},
  46. new BoundFieldColumn { FieldName="CreateUserName", HeaderText="创建人", Align=AlignStyle.Center , },
  47. new BoundFieldColumn { FieldName="CreateTime", HeaderText="创建时间", Align=AlignStyle.Center,Formatter=Formatter.LongDate },
  48. new LinkButtonColumn { HeaderText="操作", Align=AlignStyle.Center , Text="查看视频", Handle="edit" },
  49. },
  50. IsCheckOnSelect = true,
  51. DataSourceUrl = Url.Content("~/CourseWare/List"),
  52. ID = "dgList",
  53. IsPagination = true,
  54. IsShowRowNumbers = true,
  55. IsSingleSelect = false,
  56. IsVerticalExpand = true,
  57. IsAutoHeight = false,
  58. PageSize = 15
  59. })
  60. </div>
  61. </div>
  62. <script type="text/javascript">
  63. $(function () {
  64. $("#btnSearch").click(function () {
  65. loadGrid();
  66. });
  67. });
  68. function edit(index, row) {
  69. }
  70. function loadGrid() {
  71. var queryForm = $("#fm").getFormData();
  72. $("#dgList").cmsXDataTable("load", queryForm);
  73. }
  74. </script>