List.cshtml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 class="sn" style="padding-left: 5px;">课程编码:</li>
  23. <li class="sv">
  24. @Html.TextBox("CourseCode")
  25. </li>
  26. <li>
  27. @Html.Button(new ButtonOptions() { ID = "btnSearch", Text = "查 询" })
  28. </li>
  29. </ul>
  30. </div>
  31. </div>
  32. }
  33. <div class="search_list">
  34. @Html.DataGrid(new DataGridOptions
  35. {
  36. Columns = new List<DataGridColumn>()
  37. {
  38. new CheckBoxFieldColumn{ HeaderText="", FieldName="CoursematerialID"},
  39. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center},
  40. new BoundFieldColumn { FieldName="CourseCode", HeaderText="课程编码", Align=AlignStyle.Center },
  41. //new BoundFieldColumn { FieldName="Credit", HeaderText="学分", Align=AlignStyle.Center},
  42. //new BoundFieldColumn { FieldName="Hours", HeaderText="学时", Align=AlignStyle.Center},
  43. new LinkButtonColumn { Text="课程章节", HeaderText="操作", Align=AlignStyle.Center, Handle="edit" },
  44. },
  45. IsCheckOnSelect = true,
  46. DataSourceUrl = Url.Content("~/CourseBuild/List"),
  47. ID = "dgList",
  48. IsPagination = true,
  49. IsShowRowNumbers = true,
  50. IsSingleSelect = false,
  51. IsVerticalExpand = true,
  52. IsAutoHeight = false,
  53. PageSize = 15
  54. })
  55. </div>
  56. </div>
  57. <script type="text/javascript">
  58. $(function () {
  59. $("#btnSearch").click(function () {
  60. loadGrid();
  61. });
  62. });
  63. function loadGrid() {
  64. var queryForm = $("#fm").getFormData();
  65. $("#dgList").cmsXDataTable("load", queryForm);
  66. }
  67. function edit(rowindex, rowdata) {
  68. var url = CMS_SystemConfig.VirtualDirectoryPath + "/CourseBuild/ChapterList?CoursematerialID=" + rowdata.CoursematerialID;
  69. $.popupTopWindow('课程章节[' + rowdata.CourseName + ']', url, 850, 600, null, null);
  70. }
  71. </script>