CourseworkList.cshtml 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. <form id="formQuery" method="post" action="@Url.Content("~/Students/Excel")">
  14. <div class="search_keyword">
  15. <div class="search_input">
  16. <ul>
  17. <li class="sn" style="padding-left: 5px;">校区:</li>
  18. <li class="sv">
  19. @Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/Campus/CampusDropdownListBanid"), ID = "CampusDropdown", Name = "CampusDropdown", OnSelect = "queryCollege" }, new Dictionary<string, string> { { "data-condition", "dgList" } })
  20. </li>
  21. <li class="sn" style="padding-left: 5px;">院系所:</li>
  22. <li class="sv">
  23. @Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/College/CollegeDropdownListBanid"), ID = "CollegeDropdown", Name = "CollegeDropdown", OnSelect = "reload" }, new Dictionary<string, string> { { "data-condition", "dgList" } })
  24. </li>
  25. <li class="sn" style="padding-left: 5px;">班级名称:</li>
  26. <li class="sv">
  27. @Html.DropdownList(new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/Classmajor/BindDropdownList"), ID = "ClassmajorDropdown", Name = "ClassmajorDropdown", OnSelect = "reload" }, new Dictionary<string, string> { { "data-condition", "dgList" } })
  28. </li>
  29. <li>
  30. @Html.Button(new ButtonOptions() { ID = "btnSearch", Text = "查 询" })
  31. @Html.Button(new ButtonOptions() { ID = "btnAdd", Text = "发布作业" })
  32. </li>
  33. </ul>
  34. </div>
  35. </div>
  36. </form>
  37. <div class="p_title">
  38. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  39. 考试信息</div>
  40. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  41. </div>
  42. </div>
  43. <div class="search_list">
  44. @Html.DataGrid(new DataGridOptions
  45. {
  46. Columns = new List<DataGridColumn>()
  47. {
  48. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID"},
  49. new LinkButtonColumn { FieldName="test_paper_name", HeaderText="试卷名称", Align=AlignStyle.Center,Handle="edit" },
  50. new BoundFieldColumn { FieldName="WorkName", HeaderText="作业名称", Align=AlignStyle.Center },
  51. new BoundFieldColumn { FieldName="test_begin_date", HeaderText="开始时间", Align=AlignStyle.Center, Formatter= Formatter.OnlyYearMonthDay},
  52. new BoundFieldColumn { FieldName="test_end_date", HeaderText="结束时间", Align=AlignStyle.Center , Formatter= Formatter.OnlyYearMonthDay },
  53. new BoundFieldColumn { FieldName="status", HeaderText="作业状态", Align=AlignStyle.Center },
  54. new LinkButtonColumn { HeaderText="操作", Align=AlignStyle.Center, Text="进入作业", Handle="edit"},
  55. },
  56. IsCheckOnSelect = true,
  57. DataSourceUrl = Url.Content("~/MyCoursework/List"),
  58. ID = "dgList",
  59. IsPagination = true,
  60. IsShowRowNumbers = true,
  61. IsSingleSelect = false,
  62. IsVerticalExpand = true,
  63. IsAutoHeight = false,
  64. })
  65. </div>
  66. </div>
  67. @section scripts{
  68. <script type="text/javascript">
  69. $(function () {
  70. $('#btnAdd').click(function () {
  71. window.location.href = "@Url.Content("~/Coursework/CourseworkAdd")";
  72. })
  73. })
  74. function edit(index, row) {
  75. window.location.href = ("@Url.Content("~/MyCoursework/CourseworView")?workid=" + row.id);
  76. }
  77. </script>
  78. }