Edit.cshtml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. @model EMIS.ViewModel.EducationManage.EducationMissionClassCheckView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. ComboGridOptions time = new ComboGridOptions
  7. {
  8. TextField = "Times",
  9. ValueField = "CoursesTimeID",
  10. OnSelect = "GetEducationMissionClassBy",
  11. Name = "TimeComboGrid",
  12. GridOptions = new DataGridOptions
  13. {
  14. Columns = new List<DataGridColumn>()
  15. {
  16. new BoundFieldColumn { FieldName="Times", HeaderText="节次", Align=AlignStyle.Center }
  17. },
  18. IsCheckOnSelect = true,
  19. DataSourceUrl = Url.Content("~/CoursesTime/List"),
  20. IsPagination = true,
  21. IsShowRowNumbers = true,
  22. IsSingleSelect = false
  23. }
  24. };
  25. ComboGridOptions timefalse = new ComboGridOptions
  26. {
  27. TextField = "Times",
  28. ValueField = "CoursesTimeID",
  29. OnSelect = "GetEducationMissionClassBy",
  30. Name = "TimeComboGrid",
  31. IsEnabled = false,
  32. GridOptions = new DataGridOptions
  33. {
  34. Columns = new List<DataGridColumn>()
  35. {
  36. new BoundFieldColumn { FieldName="Times", HeaderText="节次", Align=AlignStyle.Center }
  37. },
  38. IsCheckOnSelect = true,
  39. DataSourceUrl = Url.Content("~/CoursesTime/List"),
  40. IsPagination = true,
  41. IsShowRowNumbers = true,
  42. IsSingleSelect = false
  43. }
  44. };
  45. ComboGridOptions classroom = new ComboGridOptions
  46. {
  47. TextField = "Name",
  48. ValueField = "ClassroomID",
  49. //OnSelect = "GetEducationMissionClassBy",
  50. Name = "ClassroomDropdown",
  51. OnChange = "GetEducationMissionClassBy",
  52. GridOptions = new DataGridOptions
  53. {
  54. Columns = new List<DataGridColumn>()
  55. {
  56. new BoundFieldColumn { FieldName="Code", HeaderText="教室代码", Width=0.1, Align=AlignStyle.Center },
  57. new BoundFieldColumn { FieldName="Name", HeaderText="教室名称", Width=0.1, Align=AlignStyle.Center }
  58. },
  59. IsCheckOnSelect = true,
  60. DataSourceUrl = Url.Content("~/Classroom/List"),
  61. IsPagination = true,
  62. IsShowRowNumbers = true,
  63. IsSingleSelect = false,
  64. }
  65. };
  66. ComboGridOptions classroomfalse = new ComboGridOptions
  67. {
  68. TextField = "Name",
  69. ValueField = "ClassroomID",
  70. //OnSelect = "GetEducationMissionClassBy",
  71. Name = "ClassroomDropdown",
  72. OnChange = "GetEducationMissionClassBy",
  73. IsEnabled = false,
  74. GridOptions = new DataGridOptions
  75. {
  76. Columns = new List<DataGridColumn>()
  77. {
  78. new BoundFieldColumn { FieldName="Code", HeaderText="教室代码", Width=0.1, Align=AlignStyle.Center },
  79. new BoundFieldColumn { FieldName="Name", HeaderText="教室名称", Width=0.1, Align=AlignStyle.Center }
  80. },
  81. IsCheckOnSelect = true,
  82. DataSourceUrl = Url.Content("~/Classroom/List"),
  83. IsPagination = true,
  84. IsShowRowNumbers = true,
  85. IsSingleSelect = false,
  86. }
  87. };
  88. ComboGridOptions cgopClassmajor = new ComboGridOptions
  89. {
  90. TextField = "Name",
  91. ValueField = "ClassmajorID",
  92. Name = "ClassmajorDropdown",
  93. OnSelect = "",
  94. GridOptions = new DataGridOptions
  95. {
  96. Columns = new List<DataGridColumn>()
  97. {
  98. //new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center },
  99. new BoundFieldColumn { FieldName="Name", HeaderText="班级名称", Align=AlignStyle.Center }
  100. },
  101. IsCheckOnSelect = true,
  102. DataSourceUrl = Url.Content("~/Classmajor/List"),
  103. IsPagination = true,
  104. IsShowRowNumbers = true,
  105. IsSingleSelect = false
  106. }
  107. };
  108. ComboGridOptions education = new ComboGridOptions
  109. {
  110. TextField = "Name",
  111. ValueField = "EducationMissionClassID",
  112. Name = "EducationMissionDropdown",
  113. OnSelect = "",
  114. OnChange = "GetTeacherName",
  115. GridOptions = new DataGridOptions
  116. {
  117. Columns = new List<DataGridColumn>()
  118. {
  119. //new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center },
  120. new BoundFieldColumn { FieldName="Name", HeaderText="任务班名称", Align=AlignStyle.Center, Width=350 }
  121. },
  122. IsCheckOnSelect = true,
  123. DataSourceUrl = Url.Content("~/EducationMissionClassCheck/GetEducationMissionClass"),
  124. IsPagination = true,
  125. IsShowRowNumbers = true,
  126. IsSingleSelect = false,
  127. OnLoadSuccessFun = "setFirst",
  128. IsAutoLoad = false,
  129. }
  130. };
  131. ComboGridOptions educationfalse = new ComboGridOptions
  132. {
  133. TextField = "Name",
  134. ValueField = "EducationMissionClassID",
  135. Name = "EducationMissionDropdown",
  136. OnSelect = "",
  137. OnChange = "GetTeacherName",
  138. IsEnabled = false,
  139. GridOptions = new DataGridOptions
  140. {
  141. Columns = new List<DataGridColumn>()
  142. {
  143. //new LinkButtonColumn { FieldName="No", HeaderText="班级编号", Align=AlignStyle.Center },
  144. new BoundFieldColumn { FieldName="Name", HeaderText="任务班名称", Align=AlignStyle.Center, Width=350 }
  145. },
  146. IsCheckOnSelect = true,
  147. DataSourceUrl = Url.Content("~/EducationMissionClassCheck/GetEducationMissionClass"),
  148. IsPagination = true,
  149. IsShowRowNumbers = true,
  150. IsSingleSelect = false,
  151. OnLoadSuccessFun = "setFirst",
  152. IsAutoLoad = false,
  153. }
  154. };
  155. ComboGridOptions course = new ComboGridOptions
  156. {
  157. TextField = "CourseName",
  158. ValueField = "CoursematerialID",
  159. OnSelect = "",
  160. Name = "CoursematerialComboGrid",
  161. GridOptions = new DataGridOptions
  162. {
  163. Columns = new List<DataGridColumn>()
  164. {
  165. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center }
  166. },
  167. IsCheckOnSelect = true,
  168. DataSourceUrl = Url.Content("~/EducationMissionClassCheck/GetCoursematerial"),
  169. IsPagination = true,
  170. IsShowRowNumbers = true,
  171. IsSingleSelect = false,
  172. OnLoadSuccessFun = "setCoursematerial",
  173. IsAutoLoad = false,
  174. }
  175. };
  176. ComboGridOptions coursefalse = new ComboGridOptions
  177. {
  178. TextField = "CourseName",
  179. ValueField = "CoursematerialID",
  180. OnSelect = "",
  181. Name = "CoursematerialComboGrid",
  182. IsEnabled = false,
  183. GridOptions = new DataGridOptions
  184. {
  185. Columns = new List<DataGridColumn>()
  186. {
  187. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center }
  188. },
  189. IsCheckOnSelect = true,
  190. DataSourceUrl = Url.Content("~/EducationMissionClassCheck/GetCoursematerial"),
  191. IsPagination = true,
  192. IsShowRowNumbers = true,
  193. IsSingleSelect = false,
  194. OnLoadSuccessFun = "setCoursematerial",
  195. IsAutoLoad = false,
  196. }
  197. };
  198. }
  199. @section scripts{
  200. <script src="~/Scripts/Business/EducationManage/EducationMissionClassCheckEdit.js" type="text/javascript"></script>
  201. <script type="text/javascript">
  202. var nonSelect = "@DropdownList.SELECT_ALL";
  203. var isUpdate = "@ViewBag.IsUpdate";
  204. </script>
  205. }
  206. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  207. @using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  208. {
  209. <div class="p_title">
  210. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  211. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  212. @Html.ContextMenuBar("Edit")
  213. </div>
  214. </div>
  215. <div class="search_list">
  216. @Html.HiddenFor(x => x.EducationMissionClassCheckID)
  217. <table cellpadding="0" cellspacing="0" id="educationMissionClassChecktable">
  218. <tr>
  219. <td>@Html.LabelFor(x => x.SchoolyearCode):</td>
  220. @if (@ViewBag.IsUpdate == "edit")
  221. {
  222. <td>@Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"), OnSelect = "GetEducationMissionClassBy", SelectedValue = @ViewBag.SchoolYearID, IsEnabled = false })</td>
  223. }
  224. else
  225. {
  226. <td>@Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid"), OnSelect = "GetEducationMissionClassBy", SelectedValue = @ViewBag.SchoolYearID })</td>
  227. }
  228. <td>@Html.LabelFor(x => x.WeekNum):</td>
  229. @if (@ViewBag.IsUpdate == "edit")
  230. {
  231. <td>@Html.DropdownListFor(x => x.WeekNum, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/SchoolYear/GetWeekListDropdown"), OnSelect = "GetEducationMissionClassBy", IsEnabled = false })</td>
  232. }
  233. else
  234. {
  235. <td>@Html.DropdownListFor(x => x.WeekNum, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/SchoolYear/GetWeekListDropdown"), OnSelect = "GetEducationMissionClassBy" })</td>
  236. }
  237. </tr>
  238. <tr>
  239. <td>@Html.LabelFor(x => x.Weekday):</td>
  240. @if (@ViewBag.IsUpdate == "edit")
  241. {
  242. <td>
  243. @Html.WeekdayDropDownListFor(x => x.Weekday, new DropdownListOptions { OnSelect = "GetEducationMissionClassBy", IsEnabled = false })
  244. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.ES_WeekDay, (x => x.Weekday), new DropdownListOptions { OnSelect = "GetEducationMissionClassBy", IsEnabled = false })*@
  245. </td>
  246. }
  247. else
  248. {
  249. <td>
  250. @Html.WeekdayDropDownListFor(x => x.Weekday, new DropdownListOptions { OnSelect = "GetEducationMissionClassBy" })
  251. @*@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.ES_WeekDay, (x => x.Weekday), new DropdownListOptions { OnSelect = "GetEducationMissionClassBy" })*@
  252. </td>
  253. }
  254. <td>@Html.LabelFor(x => x.CoursesTimeID):</td>
  255. @if (@ViewBag.IsUpdate == "edit")
  256. {
  257. <td>@Html.ComboGridFor(x => x.CoursesTimeID, timefalse)</td>
  258. }
  259. else
  260. {
  261. <td>@Html.ComboGridFor(x => x.CoursesTimeID, time)</td>
  262. }
  263. </tr>
  264. <tr>
  265. <td>@Html.LabelFor(x => x.ClassroomID):</td>
  266. @if (@ViewBag.IsUpdate == "edit")
  267. {
  268. <td>@Html.ComboGridFor(x => x.ClassroomID, classroomfalse)</td>
  269. }
  270. else
  271. {
  272. <td>@Html.ComboGridFor(x => x.ClassroomID, classroom)</td>
  273. }
  274. <td>@Html.LabelFor(x => x.EducationMissionClassID):</td>
  275. @if (@ViewBag.IsUpdate == "edit")
  276. {
  277. <td>@Html.ComboGridFor(x => x.EducationMissionClassID, educationfalse)</td>
  278. }
  279. else
  280. {
  281. <td>@Html.ComboGridFor(x => x.EducationMissionClassID, education)</td>
  282. }
  283. </tr>
  284. <tr>
  285. <td>@Html.LabelFor(x => x.CoursematerialID):</td>
  286. @if (@ViewBag.IsUpdate == "edit")
  287. {
  288. <td>@Html.ComboGridFor(x => x.CoursematerialID, coursefalse)</td>
  289. }
  290. else
  291. {
  292. <td>@Html.ComboGridFor(x => x.CoursematerialID, course)</td>
  293. }
  294. <td>@Html.LabelFor(x => x.TeacherName):</td>
  295. <td>@Html.TextBoxFor(x => x.TeacherName, new TextBoxOptions() { IsEnabled = false })</td>
  296. </tr>
  297. <tr>
  298. <td>@Html.LabelFor(x => x.StudentComment):</td>
  299. <td colspan="3">@Html.TextAreaFor(x => x.StudentComment, new { style = "width:470px;" })</td>
  300. </tr>
  301. <tr>
  302. <td>@Html.LabelFor(x => x.TeacherComment):</td>
  303. <td colspan="3">@Html.TextAreaFor(x => x.TeacherComment, new { style = "width:470px;" })</td>
  304. </tr>
  305. <tr>
  306. <td>@Html.LabelFor(x => x.DeviceComment):</td>
  307. <td colspan="3">@Html.TextAreaFor(x => x.DeviceComment, new { style = "width:470px;" })</td>
  308. </tr>
  309. <tr>
  310. <td>@Html.LabelFor(x => x.CheckWayID):</td>
  311. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EM_EducationMissionClassCheckWay, (x => x.CheckWayID))</td>
  312. <td>@Html.LabelFor(x => x.OpinionID):</td>
  313. <td>@Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EM_EducationMissionClassCheckOpinion, (x => x.OpinionID))</td>
  314. </tr>
  315. <tr>
  316. <td>
  317. <label>检查人员:</label>
  318. </td>
  319. <td colspan="3">
  320. @Html.ContextMenuBar("Edit-Staff")
  321. @Html.DataGrid(new DataGridOptions
  322. {
  323. Columns = new List<DataGridColumn>()
  324. {
  325. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID" },
  326. new LinkButtonColumn { FieldName="LoginID", HeaderText="教职工号", Align=AlignStyle.Center , Handle="edit" },
  327. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center },
  328. new BoundFieldColumn { FieldName="SexName", HeaderText="性别", Align=AlignStyle.Center },
  329. new BoundFieldColumn { FieldName="TitleName", HeaderText="职称", Align=AlignStyle.Center },
  330. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center },
  331. new BoundFieldColumn { FieldName="CollegeID", HeaderText=@EMIS.Utility.RSL.Get("College"), Align=AlignStyle.Center ,IsHidden=true },
  332. new BoundFieldColumn { FieldName="DepartmentID", HeaderText="教研室", Align=AlignStyle.Center,IsHidden=true },
  333. new BoundFieldColumn { FieldName="DepartmentName", HeaderText="教研室", Align=AlignStyle.Center },
  334. },
  335. IsCheckOnSelect = true,
  336. DataSourceUrl = Url.Content("~/EducationMissionClassCheck/TeacherList?educationMissionClassCheckID=" + Model.EducationMissionClassCheckID),
  337. IsPostBack = true,
  338. ID = "dgTeacherList",
  339. IsPagination = true,
  340. IsShowRowNumbers = true,
  341. IsSingleSelect = false
  342. })
  343. </td>
  344. </tr>
  345. <tr>
  346. <td>@Html.LabelFor(x => x.Remark):</td>
  347. <td colspan="3">@Html.TextAreaFor(x => x.Remark, new { style = "width:470px;" })</td>
  348. </tr>
  349. </table>
  350. </div>
  351. }
  352. </div>