Edit.cshtml 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. @model EMIS.Entities.CF_Classmajor
  2. @using Bowin.Web.Controls.Mvc;
  3. @using EMIS.Entities;
  4. @using EMIS.Web.Controls;
  5. @using EMIS.ViewModel;
  6. @{
  7. ViewBag.Title = "List";
  8. }
  9. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  10. <div class="p_title">
  11. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  12. 班级可排时间设置</div>
  13. @if (Request["isView"] != "1")
  14. {
  15. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  16. }
  17. @using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  18. {
  19. <div class="search_list">
  20. @Html.HiddenFor(x => x.ClassmajorID)
  21. <table cellpadding="0" cellspacing="0" id="classmajortable">
  22. <tr>
  23. <td>
  24. <label>
  25. 班级编号:</label>
  26. </td>
  27. <td>@Html.TextBoxFor(x => x.No, new TextBoxOptions { IsEnabled = false })
  28. </td>
  29. <td>
  30. <label>
  31. 班级名称:</label>
  32. </td>
  33. <td>@Html.TextBoxFor(x => x.Name, new TextBoxOptions { IsEnabled = false })
  34. </td>
  35. </tr>
  36. <tr>
  37. <td colspan="4">
  38. @Html.DataGrid(new DataGridOptions
  39. {
  40. Columns = new List<DataGridColumn>()
  41. {
  42. new BoundFieldColumn { FieldName="Times", HeaderText="节次", Align=AlignStyle.Center },
  43. new BoundFieldColumn { FieldName="TimesSegmentName", HeaderText="时间段", Align=AlignStyle.Center },
  44. new BoundFieldColumn { FieldName="StartTime", HeaderText="开始时间", Align=AlignStyle.Center },
  45. new BoundFieldColumn { FieldName="EndTime", HeaderText="结束时间", Align=AlignStyle.Center },
  46. new CheckButtonColumn { FieldName="MondayIsOnWork",HeaderText="星期一" },
  47. new CheckButtonColumn { FieldName="TuesdayIsOnWork",HeaderText="星期二" },
  48. new CheckButtonColumn { FieldName="WednesdayIsOnWork",HeaderText="星期三" },
  49. new CheckButtonColumn { FieldName="ThursdayIsOnWork",HeaderText="星期四" },
  50. new CheckButtonColumn { FieldName="FridayIsOnWork",HeaderText="星期五" },
  51. new CheckButtonColumn { FieldName="SaturdayIsOnWork",HeaderText="星期六" },
  52. new CheckButtonColumn { FieldName="SundayIsOnWork",HeaderText="星期日" },
  53. },
  54. DataSourceUrl = Url.Content("~/ClassmajorScheduleSetting/ArrangementsList?classmajorID=" + Model.ClassmajorID),
  55. ID = "dgArrangementsList",
  56. IsPostBack = true,
  57. IsPagination = false,
  58. IsShowRowNumbers = true,
  59. IsSingleSelect = false
  60. })
  61. </td>
  62. </tr>
  63. </table>
  64. </div>
  65. }
  66. </div>
  67. </div>
  68. @section scripts{
  69. <script type="text/javascript">
  70. function ClassmajorScheduleSetting_Save() {
  71. $(document.forms[0]).submit();
  72. }
  73. </script>
  74. }