Edit.cshtml 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. @model EMIS.Entities.CF_Staff
  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. .textwidth
  11. {
  12. width: 99%;
  13. }
  14. </style>
  15. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  16. <div class="p_title">
  17. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  18. 教师可排时间设置</div>
  19. @if (Request["isView"] != "1")
  20. {
  21. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  22. }
  23. @using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  24. {
  25. <div class="search_list">
  26. @Html.HiddenFor(x => x.UserID)
  27. <table cellpadding="0" cellspacing="0" id="classroomReservetable">
  28. <tr>
  29. <td style="width: 105px;">
  30. <label>
  31. 姓名:</label>
  32. </td>
  33. <td colspan="3">@Html.TextBoxFor(x => x.Sys_User.Name, new TextBoxOptions { IsEnabled = false, CssClass = "textwidth" })
  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("~/TeacherScheduleSetting/ArrangementsList?userID=" + Model.UserID),
  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 TeacherScheduleSetting_Save() {
  71. $(document.forms[0]).submit();
  72. }
  73. </script>
  74. }