Edit.cshtml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. @model EMIS.ViewModel.EducationSchedule.ClassroomExcessiveUseView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. ComboGridOptions optClassroom = new ComboGridOptions
  7. {
  8. TextField = "Name",
  9. ValueField = "ClassroomID",
  10. GridOptions = new DataGridOptions
  11. {
  12. Columns = new List<DataGridColumn>()
  13. {
  14. new BoundFieldColumn { FieldName="Name", HeaderText="教室名称", Align=AlignStyle.Center }
  15. },
  16. IsCheckOnSelect = true,
  17. DataSourceUrl = Url.Content("~/Classroom/ListIsEnable"),
  18. IsPagination = true,
  19. IsShowRowNumbers = true,
  20. IsSingleSelect = false,
  21. }
  22. };
  23. ComboGridOptions optCollege = new ComboGridOptions
  24. {
  25. TextField = "Name",
  26. ValueField = "CollegeID",
  27. GridOptions = new DataGridOptions
  28. {
  29. Columns = new List<DataGridColumn>()
  30. {
  31. new BoundFieldColumn { FieldName="Name", HeaderText=EMIS.Utility.RSL.Get("CollegeName"), Align=AlignStyle.Center }
  32. },
  33. IsCheckOnSelect = true,
  34. DataSourceUrl = Url.Content("~/College/List"),
  35. IsPagination = true,
  36. IsShowRowNumbers = true,
  37. IsSingleSelect = false,
  38. }
  39. };
  40. ComboGridOptions optUser = new ComboGridOptions
  41. {
  42. TextField = "Name",
  43. ValueField = "UserID",
  44. GridOptions = new DataGridOptions
  45. {
  46. Columns = new List<DataGridColumn>()
  47. {
  48. new LinkButtonColumn { FieldName="StaffCode", HeaderText="教职工号", Align=AlignStyle.Center, Width=0.1 },
  49. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.12 }
  50. },
  51. IsCheckOnSelect = true,
  52. DataSourceUrl = Url.Content("~/Staff/GetAllStaffDataBind"),
  53. IsPagination = true,
  54. IsShowRowNumbers = true,
  55. IsSingleSelect = false
  56. }
  57. };
  58. }
  59. @section scripts{
  60. <script src="~/Scripts/Business/Common/WeekNum.js" type="text/javascript"></script>
  61. <script src="~/Scripts/Business/SchedulingManage/ClassroomExcessiveUse/ClassroomExcessiveUseEdit.js" type="text/javascript"></script>
  62. <script type="text/javascript">
  63. var nonSelect = "@DropdownList.SELECT_ALL";
  64. </script>
  65. }
  66. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  67. @using (Ajax.BeginForm(new AjaxOptions
  68. {
  69. OnSuccess = "FormSuccess",
  70. OnBegin = "EMISFunction.FormSubmit",
  71. OnComplete = "EMISFunction.FormComplete"
  72. }))
  73. {
  74. @Html.HiddenFor(x => x.ClassroomExcessiveUseID)
  75. <div class="p_title">
  76. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  77. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  78. @Html.ContextMenuBar("Edit")
  79. </div>
  80. </div>
  81. <div class="search_list">
  82. <table cellpadding="0" cellspacing="0" id="buildingstable">
  83. <tr>
  84. <td>@Html.LabelFor(x => x.SchoolyearID):</td>
  85. <td>@Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions { BindType = DropdownListBindType.SelectAll, ItemSourceUrl = Url.Content("~/SchoolYear/DropDown"), IsEnabled = false })</td>
  86. <td>@Html.LabelFor(x => x.ClassroomID):</td>
  87. <td>@Html.ComboGridFor((x => x.ClassroomID), optClassroom)</td>
  88. </tr>
  89. <tr>
  90. <td>@Html.LabelFor(x => x.CollegeID):</td>
  91. <td>@Html.ComboGridFor(x => x.CollegeID, optCollege)</td>
  92. <td>@Html.LabelFor(x => x.UserID):</td>
  93. <td>@Html.ComboGridFor(x => x.UserID, optUser)</td>
  94. </tr>
  95. <tr>
  96. <td>@Html.LabelFor(x => x.Content):</td>
  97. <td colspan="3">@Html.TextAreaFor(x => x.Content, new Dictionary<string, object> { { "style", "width: 96%;" } })</td>
  98. </tr>
  99. <tr>
  100. <td>
  101. @Html.LabelFor(x => x.Scheduling):
  102. </td>
  103. <td colspan="3">
  104. @Html.ContextMenuBar("Edit-SchedulingGrid")
  105. @Html.DataGrid(new DataGridOptions
  106. {
  107. Columns = new List<DataGridColumn>()
  108. {
  109. new CheckBoxFieldColumn { HeaderText="", FieldName="ClassroomExcessiveUseSchedulingID" },
  110. new BoundFieldColumn { HeaderText="周次", FieldName="WeekNumList", CustomFormatFun="CMSFunction.DataTableFormatter.WeekNum", Align=AlignStyle.Center, Width=80 },
  111. new LinkButtonColumn { HeaderText="星期", FieldName="WeekdayDesc", Align=AlignStyle.Center, Width=80, Handle="Scheduling_Edit" },
  112. new BoundFieldColumn { HeaderText="节次", FieldName="TimeDesc", Align=AlignStyle.Center, Width=80 },
  113. },
  114. IsPostBack = true,
  115. IsCheckOnSelect = true,
  116. DataSourceUrl = Url.Content("~/ClassroomExcessiveUse/SchedulingList?classroomExcessiveUseID=" + Model.ClassroomExcessiveUseID),
  117. ID = "dgSchedulingList",
  118. IsPagination = false,
  119. IsShowRowNumbers = true,
  120. IsSingleSelect = false,
  121. MaxHeight = 120
  122. })
  123. </td>
  124. </tr>
  125. </table>
  126. </div>
  127. }
  128. </div>