SetTeacher.cshtml 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. @model EMIS.ViewModel.EducationManagement.EducationMissionClassView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @using EMIS.ViewModel;
  5. @{
  6. ViewBag.Title = "Edit";
  7. List<ListControlItem> lct = ViewData["lct"] as List<ListControlItem>;
  8. ListControlOptions lcop = new ListControlOptions
  9. {
  10. Name = "TeachingModeID",
  11. TextField = "Name",
  12. ValueField = "Value",
  13. ColumnCount = 4,
  14. ItemList = lct,
  15. SelectedValueUrl = Url.Content("~/EducationMissionClass/CheckEducationMissionClassSettingsList?educationMissionClassID=" + Model.EducationMissionClassID)
  16. };
  17. ComboGridOptions cgop = new ComboGridOptions
  18. {
  19. TextField = "Name",
  20. ValueField = "ClassroomID",
  21. IsEnabled = false,
  22. GridOptions = new DataGridOptions
  23. {
  24. Columns = new List<DataGridColumn>()
  25. {
  26. new LinkButtonColumn { FieldName="Code", HeaderText="教室代码", Width=0.1, Align=AlignStyle.Center },
  27. new BoundFieldColumn { FieldName="Name", HeaderText="教室名称", Width=0.1, Align=AlignStyle.Center }
  28. },
  29. IsCheckOnSelect = true,
  30. // DataSourceUrl = Url.Content("~/CollegeClassroom/ClassroomListComboGrid?collegeID=" + Model.CollegeID),
  31. DataSourceUrl = Url.Content("~/Classroom/List"),//去除院系条件
  32. IsPagination = true,
  33. IsShowRowNumbers = true,
  34. IsSingleSelect = false
  35. }
  36. };
  37. ComboGridOptions cgopCollege = new ComboGridOptions
  38. {
  39. TextField = "Name",
  40. ValueField = "CollegeID",
  41. OnSelect = "reload",
  42. Name = "CollegeDropdown",
  43. ID = "CollegeDropdown",
  44. GridOptions = new DataGridOptions
  45. {
  46. Columns = new List<DataGridColumn>()
  47. {
  48. // new LinkButtonColumn { FieldName="No", HeaderText=@EMIS.Utility.RSL.Get("CollegeCode"), Align=AlignStyle.Center },
  49. new BoundFieldColumn { FieldName="Name", HeaderText="教职工名称", Align=AlignStyle.Center }
  50. },
  51. IsCheckOnSelect = true,
  52. DataSourceUrl = Url.Content("~/College/List"),
  53. IsPagination = true,
  54. IsShowRowNumbers = true,
  55. IsSingleSelect = false,
  56. }
  57. };
  58. ComboGridOptions cgopDepartment = new ComboGridOptions
  59. {
  60. TextField = "Name",
  61. ValueField = "DepartmentID",
  62. OnSelect = "reload",
  63. Name = "DepartmentDropdown",
  64. ID = "DepartmentDropdown",
  65. GridOptions = new DataGridOptions
  66. {
  67. Columns = new List<DataGridColumn>()
  68. {
  69. // new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center },
  70. new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center }
  71. },
  72. IsCheckOnSelect = true,
  73. DataSourceUrl = Url.Content("~/Department/List"),
  74. IsPagination = true,
  75. IsShowRowNumbers = true,
  76. IsSingleSelect = false,
  77. }
  78. };
  79. ComboGridOptions cgopSaff = new ComboGridOptions
  80. {
  81. TextField = "Name",
  82. ValueField = "UserID",
  83. OnSelect = "reload",
  84. Name = "SaffDropdown",
  85. ID = "SaffDropdown",
  86. GridOptions = new DataGridOptions
  87. {
  88. Columns = new List<DataGridColumn>()
  89. {
  90. new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center }
  91. },
  92. IsCheckOnSelect = true,
  93. DataSourceUrl = Url.Content("~/Staff/List"),
  94. IsPagination = true,
  95. IsShowRowNumbers = true,
  96. IsSingleSelect = false,
  97. }
  98. };
  99. }
  100. @section scripts{
  101. <script src="~/Scripts/Business/EducationManage/EducationMissionClassEdit.js" type="text/javascript"></script>
  102. <script type="text/javascript">
  103. var nonSelect = "@DropdownList.SELECT_ALL";
  104. </script>
  105. }
  106. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  107. @using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete", Url = "/EducationMissionClass/SetTeacher", }))
  108. {
  109. <div class="p_title">
  110. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("EditTeaConfirm")</div>
  111. </div>
  112. <div class="search_list">
  113. @Html.HiddenFor(x => x.EducationMissionClassID)
  114. @Html.HiddenFor(x => x.CollegeID)
  115. @Html.HiddenFor(x => x.SchoolyearID)
  116. @Html.Hidden("hid_TeacherJsonStr")
  117. <table cellpadding="0" cellspacing="0" id="educationMissionClasstable">
  118. <tr>
  119. <td>@Html.LabelFor(x => x.SchoolyearCode):
  120. </td>
  121. <td>@Html.TextBoxFor(x => x.SchoolyearCode, new TextBoxOptions { IsEnabled = false })
  122. </td>
  123. <td>@Html.LabelFor(x => x.Name):
  124. </td>
  125. <td>@Html.TextBoxFor(x => x.Name, new TextBoxOptions { IsEnabled = false })
  126. </td>
  127. </tr>
  128. <tr>
  129. <td>@Html.LabelFor(x => x.CourseName):
  130. </td>
  131. <td>@Html.TextBoxFor(x => x.CourseName, new TextBoxOptions { IsEnabled = false })
  132. </td>
  133. <td>@Html.LabelFor(x => x.CourseCode):
  134. </td>
  135. <td>@Html.TextBoxFor(x => x.CourseCode, new TextBoxOptions { IsEnabled = false })
  136. </td>
  137. </tr>
  138. <tr>
  139. <td>@Html.LabelFor(x => x.ClassroomTypeID):
  140. </td>
  141. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ClassroomType, (x => x.ClassroomTypeID), new DropdownListOptions { IsEnabled = false })
  142. </td>
  143. <td>@Html.LabelFor(x => x.ClassroomID):
  144. </td>
  145. <td>@Html.ComboGridFor(x => x.ClassroomID, cgop)
  146. </td>
  147. </tr>
  148. <tr>
  149. <td>@Html.LabelFor(x => x.Totalhours):
  150. </td>
  151. <td>@Html.TextBoxFor(x => x.Totalhours, new TextBoxOptions { IsEnabled = false })
  152. </td>
  153. <td>@Html.LabelFor(x => x.SchoolweeksNum):
  154. </td>
  155. <td>@Html.TextBoxFor(x => x.SchoolweeksNum, new TextBoxOptions { IsEnabled = false })
  156. </td>
  157. </tr>
  158. <tr>
  159. <td>@Html.LabelFor(x => x.StartStopWeeklyNum):
  160. </td>
  161. <td>@Html.TextBoxFor(x => x.StartStopWeeklyNum, new TextBoxOptions { IsEnabled = false })
  162. </td>
  163. <td>@Html.LabelFor(x => x.ClassNum):
  164. </td>
  165. <td>@Html.TextBoxFor(x => x.ClassNum, new TextBoxOptions { IsEnabled = false })
  166. </td>
  167. </tr>
  168. <tr>
  169. <td>
  170. <label>
  171. 授课老师:</label>
  172. </td>
  173. <td colspan="3">
  174. @Html.ContextMenuBar("EditTea")
  175. @Html.DataGrid(new DataGridOptions
  176. {
  177. Columns = new List<DataGridColumn>()
  178. {
  179. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID" },
  180. new LinkButtonColumn { FieldName="LoginID", HeaderText="教职工号", Align=AlignStyle.Center , Handle="edit" },
  181. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center },
  182. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center },
  183. new BoundFieldColumn { FieldName="TitleName", HeaderText="职称", Align=AlignStyle.Center },
  184. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center },
  185. new BoundFieldColumn { FieldName="CollegeID", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center ,IsHidden=true },
  186. new BoundFieldColumn { FieldName="DepartmentID", HeaderText="教研室", Align=AlignStyle.Center,IsHidden=true },
  187. new BoundFieldColumn { FieldName="DepartmentName", HeaderText="教研室", Align=AlignStyle.Center },
  188. new DictionaryDropdownListColumn { FieldName="TeachingMethod", HeaderText="任课方式", Align=AlignStyle.Center,
  189. DictionaryType = EMIS.ViewModel.DictionaryItem.EM_TeachingMethod },
  190. new LinkButtonColumn { Text="课表预览", HeaderText="", Align=AlignStyle.Center, Handle="Preview" }
  191. },
  192. IsCheckOnSelect = true,
  193. DataSourceUrl = Url.Content("~/EducationMissionClass/TeacherList?educationMissionClassID=" + Model.EducationMissionClassID),
  194. IsPostBack = true,
  195. ID = "dgTeacherList",
  196. IsPagination = true,
  197. IsShowRowNumbers = true,
  198. IsSingleSelect = false
  199. })
  200. </td>
  201. </tr>
  202. </table>
  203. </div>
  204. }
  205. </div>