List.cshtml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Entities;
  3. @using EMIS.Web.Controls;
  4. @using EMIS.ViewModel;
  5. @{
  6. ViewBag.Title = "List";
  7. }
  8. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  9. @Html.Position()
  10. <div class="p_title">
  11. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  12. 周工作表</div>
  13. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  14. @using (Ajax.BeginForm(new AjaxOptions { Url = "/Arrangements/Edit?MNU=" + Request["MNU"], OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  15. {
  16. <div class="search_list">
  17. @Html.DataGrid(new DataGridOptions
  18. {
  19. Columns = new List<DataGridColumn>()
  20. {
  21. new BoundFieldColumn { FieldName="Times", HeaderText="节次", Align=AlignStyle.Center },
  22. new BoundFieldColumn { FieldName="TimesSegmentName", HeaderText="时间段", Align=AlignStyle.Center },
  23. new BoundFieldColumn { FieldName="StartTime", HeaderText="开始时间", Align=AlignStyle.Center },
  24. new BoundFieldColumn { FieldName="EndTime", HeaderText="结束时间", Align=AlignStyle.Center },
  25. new CheckButtonColumn { FieldName="MondayIsOnWork",HeaderText="星期一" },
  26. new CheckButtonColumn { FieldName="TuesdayIsOnWork",HeaderText="星期二" },
  27. new CheckButtonColumn { FieldName="WednesdayIsOnWork",HeaderText="星期三" },
  28. new CheckButtonColumn { FieldName="ThursdayIsOnWork",HeaderText="星期四" },
  29. new CheckButtonColumn { FieldName="FridayIsOnWork",HeaderText="星期五" },
  30. new CheckButtonColumn { FieldName="SaturdayIsOnWork",HeaderText="星期六" },
  31. new CheckButtonColumn { FieldName="SundayIsOnWork",HeaderText="星期日" },
  32. },
  33. DataSourceUrl = Url.Content("~/Arrangements/List"),
  34. ID = "dgArrangementsList",
  35. IsPostBack = true,
  36. IsPagination = false,
  37. IsShowRowNumbers = true,
  38. IsSingleSelect = false
  39. })
  40. </div>
  41. }
  42. </div>
  43. </div>
  44. @section scripts{
  45. <script type="text/javascript">
  46. function Arrangements_Save() {
  47. $(document.forms[0]).submit();
  48. }
  49. </script>
  50. }