Edit.cshtml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. @model EMIS.ViewModel.Cultureplan.CoursematerialView
  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. <style type="text/css">
  10. #coursematerialtable
  11. {
  12. width: 100%;
  13. border: 0px none;
  14. }
  15. #coursematerialtable tr
  16. {
  17. min-height: 30px;
  18. }
  19. </style>
  20. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  21. <div class="p_title">
  22. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  23. 课程可排时间设置</div>
  24. @if (Request["isView"] != "1")
  25. {
  26. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  27. }
  28. @using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  29. {
  30. <div class="search_list">
  31. @Html.HiddenFor(x => x.CoursematerialID)
  32. <table cellpadding="0" cellspacing="0" id="coursematerialtable">
  33. <tr>
  34. <td>
  35. <label>
  36. 课程代码:</label>
  37. </td>
  38. <td>@Html.TextBoxFor(x => x.CourseCode, new TextBoxOptions { IsEnabled = false })
  39. </td>
  40. <td>
  41. <label>
  42. 课程名称:</label>
  43. </td>
  44. <td>@Html.TextBoxFor(x => x.CourseName, new TextBoxOptions { IsEnabled = false })
  45. </td>
  46. </tr>
  47. <tr>
  48. <td colspan="4">
  49. @Html.DataGrid(new DataGridOptions
  50. {
  51. Columns = new List<DataGridColumn>()
  52. {
  53. new BoundFieldColumn { FieldName="Times", HeaderText="节次", Align=AlignStyle.Center },
  54. new BoundFieldColumn { FieldName="TimesSegmentName", HeaderText="时间段", Align=AlignStyle.Center },
  55. new BoundFieldColumn { FieldName="StartTime", HeaderText="开始时间", Align=AlignStyle.Center },
  56. new BoundFieldColumn { FieldName="EndTime", HeaderText="结束时间", Align=AlignStyle.Center },
  57. new CheckButtonColumn { FieldName="MondayIsOnWork",HeaderText="星期一" },
  58. new CheckButtonColumn { FieldName="TuesdayIsOnWork",HeaderText="星期二" },
  59. new CheckButtonColumn { FieldName="WednesdayIsOnWork",HeaderText="星期三" },
  60. new CheckButtonColumn { FieldName="ThursdayIsOnWork",HeaderText="星期四" },
  61. new CheckButtonColumn { FieldName="FridayIsOnWork",HeaderText="星期五" },
  62. new CheckButtonColumn { FieldName="SaturdayIsOnWork",HeaderText="星期六" },
  63. new CheckButtonColumn { FieldName="SundayIsOnWork",HeaderText="星期日" },
  64. },
  65. DataSourceUrl = Url.Content("~/CourseScheduleSetting/ArrangementsList?coursematerialID=" + Model.CoursematerialID),
  66. ID = "dgArrangementsList",
  67. IsPostBack = true,
  68. IsPagination = false,
  69. IsShowRowNumbers = true,
  70. IsSingleSelect = false
  71. })
  72. </td>
  73. </tr>
  74. </table>
  75. </div>
  76. }
  77. </div>
  78. </div>
  79. @section scripts{
  80. <script type="text/javascript">
  81. function CourseScheduleSetting_Save() {
  82. $(document.forms[0]).submit();
  83. }
  84. </script>
  85. }