Edit.cshtml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. @model EMIS.ViewModel.CultureplanManage.SpecialtyCourseView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isEnabled = Request["type"] == "detail" ? false : true;
  7. //专业信息
  8. ComboGridOptions cgopSpecialty = new ComboGridOptions
  9. {
  10. TextField = "StandardName",
  11. ValueField = "SpecialtyID",
  12. OnSelect = "querySpecialty",
  13. IsEnabled = Request["type"] == "detail" ? false : true,
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. new LinkButtonColumn { FieldName="Code", HeaderText="专业代码", Align=AlignStyle.Center, Width=0.1 },
  19. new BoundFieldColumn { FieldName="StandardName", HeaderText="专业名称", Align=AlignStyle.Center, Width=0.2 },
  20. new BoundFieldColumn { FieldName="EducationName", HeaderText=EMIS.Utility.RSL.Get("EducationID"), Align=AlignStyle.Center, Width=0.12 },
  21. new BoundFieldColumn { FieldName="LearningformName", HeaderText="学习形式", Align=AlignStyle.Center, Width=0.12 },
  22. new BoundFieldColumn { FieldName="LearnSystem", HeaderText="学制", Align=AlignStyle.Center, Width=0.06 },
  23. new BoundFieldColumn { FieldName="RecordStatusStr", HeaderText="状态", Align=AlignStyle.Center, Width=0.1, CustomFormatFun="SetRedColumn" }
  24. },
  25. IsCheckOnSelect = true,
  26. DataSourceUrl = Url.Content("~/Specialty/GetEnableAndUseSpecialtyView?specialtyID=" + Model.SpecialtyID),
  27. IsPagination = true,
  28. IsShowRowNumbers = true,
  29. IsSingleSelect = false,
  30. }
  31. };
  32. //课程信息
  33. ComboGridOptions cgopCourse = new ComboGridOptions
  34. {
  35. ID = "CoursematerialID",
  36. TextField = "CourseName",
  37. ValueField = "CoursematerialID",
  38. IsEnabled = isEnabled,
  39. GridOptions = new DataGridOptions
  40. {
  41. Columns = new List<DataGridColumn>()
  42. {
  43. new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Align=AlignStyle.Center, Width=0.1 },
  44. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Align=AlignStyle.Center, Width=0.2 },
  45. new BoundFieldColumn { FieldName="IsEnableName", HeaderText="是否启用", Align=AlignStyle.Center, Width=0.1, CustomFormatFun="SetRedColumn" }
  46. },
  47. IsCheckOnSelect = true,
  48. DataSourceUrl = Url.Content("~/Coursematerial/GetEnableAndUseCoursematerialView?coursematerialID=" + Model.CoursematerialID),
  49. IsPagination = true,
  50. IsShowRowNumbers = true,
  51. IsSingleSelect = false
  52. }
  53. };
  54. //教研室
  55. ComboGridOptions cgopDepartment = new ComboGridOptions
  56. {
  57. TextField = "Name",
  58. ValueField = "DepartmentID",
  59. IsEnabled = isEnabled,
  60. GridOptions = new DataGridOptions
  61. {
  62. Columns = new List<DataGridColumn>()
  63. {
  64. new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.1 },
  65. new BoundFieldColumn { FieldName="Name", HeaderText="开课教研室", Align=AlignStyle.Center, Width=0.2 },
  66. new BoundFieldColumn { FieldName="CollegeName", HeaderText=@EMIS.Utility.RSL.Get("CourseCollege"), Align=AlignStyle.Center, Width=0.2 }
  67. },
  68. IsCheckOnSelect = true,
  69. DataSourceUrl = Url.Content("~/Department/List"),
  70. IsPagination = true,
  71. IsShowRowNumbers = true,
  72. IsSingleSelect = false
  73. }
  74. };
  75. //授课方式
  76. ListControlOptions lcoptm = new ListControlOptions
  77. {
  78. ID = "TeachingModeIDList",
  79. Name = "TeachingModeIDList",
  80. TextField = "Name",
  81. ValueField = "Value",
  82. ColumnCount = 4,
  83. IsEnabled = isEnabled,
  84. SelectedValueUrl = @Url.Content("~/SpecialtyCourse/TeachingModeTypeList?specialtyCourseID=" + Model.SpecialtyCourseID)
  85. };
  86. //授课地点
  87. ListControlOptions lcoptp = new ListControlOptions
  88. {
  89. ID = "TeachingPlaceIDList",
  90. Name = "TeachingPlaceIDList",
  91. TextField = "Name",
  92. ValueField = "Value",
  93. ColumnCount = 4,
  94. IsEnabled = isEnabled,
  95. SelectedValueUrl = @Url.Content("~/SpecialtyCourse/TeachingPlaceList?specialtyCourseID=" + Model.SpecialtyCourseID)
  96. };
  97. }
  98. @section scripts{
  99. <script src="~/Scripts/Business/CultureplanManage/SpecialtyCourseEdit.js" type="text/javascript"></script>
  100. <script type="text/javascript">
  101. var nonSelect = "@DropdownList.SELECT_ALL";
  102. </script>
  103. }
  104. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  105. @using (Ajax.BeginForm(new AjaxOptions
  106. {
  107. OnSuccess = "EMISFunction.FormSuccess",
  108. OnBegin = "EMISFunction.FormSubmit",
  109. OnComplete = "EMISFunction.FormComplete"
  110. }))
  111. {
  112. <div class="p_title">
  113. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  114. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  115. @if (Request["type"] != "detail")
  116. {
  117. @Html.ContextMenuBar("Edit")
  118. }
  119. </div>
  120. </div>
  121. <div class="search_list">
  122. @Html.HiddenFor(x => x.SpecialtyCourseID)
  123. <table cellpadding="0" cellspacing="0" id="specialtyCourseable">
  124. <tr>
  125. <td style="color:red;">
  126. @Html.LabelFor(x => x.StandardName):
  127. </td>
  128. <td>
  129. @Html.ComboGridFor(x => x.SpecialtyID, cgopSpecialty)
  130. </td>
  131. <td>
  132. @Html.LabelFor(x => x.StandardCode):
  133. </td>
  134. <td>
  135. @Html.TextBoxFor(x => x.StandardCode, new TextBoxOptions() { IsEnabled=false })
  136. </td>
  137. </tr>
  138. <tr>
  139. <td>
  140. @Html.LabelFor(x => x.EducationID):
  141. </td>
  142. <td>
  143. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Education, (x => x.EducationID), new DropdownListOptions() { IsEnabled = false })
  144. </td>
  145. <td>
  146. @Html.LabelFor(x => x.LearningformID):
  147. </td>
  148. <td>
  149. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, (x => x.LearningformID), new DropdownListOptions() { IsEnabled = false })
  150. </td>
  151. </tr>
  152. <tr>
  153. <td>
  154. @Html.LabelFor(x => x.LearnSystem):
  155. </td>
  156. <td>
  157. @Html.TextBoxFor(x => x.LearnSystem, new TextBoxOptions() { IsEnabled = false })
  158. </td>
  159. <td style="color:red;">
  160. @Html.LabelFor(x => x.StarttermName):
  161. </td>
  162. <td>
  163. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Startterm, x => x.StarttermID, new DropdownListOptions() { IsEnabled = isEnabled })
  164. </td>
  165. </tr>
  166. <tr>
  167. <td style="color:red;">
  168. @Html.LabelFor(x => x.CourseName):
  169. </td>
  170. <td>
  171. @Html.ComboGridFor(x => x.CoursematerialID, cgopCourse)
  172. </td>
  173. <td style="color:red;">
  174. @Html.LabelFor(x => x.DepartmentName):
  175. </td>
  176. <td>
  177. @Html.ComboGridFor(x => x.DepartmentID, cgopDepartment)
  178. </td>
  179. </tr>
  180. <tr>
  181. <td>
  182. @Html.LabelFor(x => x.CourseStructureName):
  183. </td>
  184. <td>
  185. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseStructure, x => x.CourseStructureID, new DropdownListOptions() { IsEnabled = isEnabled })
  186. </td>
  187. <td>
  188. @Html.LabelFor(x => x.CourseCategoryName):
  189. </td>
  190. <td>
  191. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseCategory, x => x.CourseCategoryID, new DropdownListOptions() { IsEnabled = isEnabled })
  192. </td>
  193. </tr>
  194. <tr>
  195. <td style="color:red;">
  196. @Html.LabelFor(x => x.CourseTypeName):
  197. </td>
  198. <td>
  199. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID, new DropdownListOptions() { IsEnabled = isEnabled })
  200. </td>
  201. <td>
  202. @Html.LabelFor(x => x.CourseQualityName):
  203. </td>
  204. <td>
  205. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseQuality, x => x.CourseQualityID, new DropdownListOptions() { IsEnabled = isEnabled })
  206. </td>
  207. </tr>
  208. <tr>
  209. <td colspan="4" style="padding:1px;height:10px;">
  210. <div id="teachingSettingExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  211. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  212. onclick="swapTeachingSetting();">
  213. </div>
  214. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapTeachingSetting();">
  215. 教学设置信息
  216. </div>
  217. </td>
  218. </tr>
  219. <tr>
  220. <td style="color:red;">
  221. @Html.LabelFor(x => x.Credit):
  222. </td>
  223. <td>
  224. @Html.TextBoxFor(x => x.Credit, new TextBoxOptions() { IsEnabled = isEnabled })
  225. </td>
  226. <td style="color:red;">
  227. @Html.LabelFor(x => x.HandleModeName):
  228. </td>
  229. <td>
  230. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_HandleMode, x => x.HandleModeID, new DropdownListOptions() { IsEnabled = isEnabled })
  231. </td>
  232. </tr>
  233. <tr>
  234. <td>
  235. @Html.LabelFor(x => x.TheoryCourse):
  236. </td>
  237. <td>
  238. @Html.TextBoxFor(x => x.TheoryCourse, new TextBoxOptions() { IsEnabled = isEnabled })
  239. </td>
  240. <td>
  241. @Html.LabelFor(x => x.Practicehours):
  242. </td>
  243. <td>
  244. @Html.TextBoxFor(x => x.Practicehours, new TextBoxOptions() { IsEnabled = isEnabled })
  245. </td>
  246. </tr>
  247. <tr>
  248. <td>
  249. @Html.LabelFor(x => x.Trialhours):
  250. </td>
  251. <td>
  252. @Html.TextBoxFor(x => x.Trialhours, new TextBoxOptions() { IsEnabled = isEnabled })
  253. </td>
  254. <td>
  255. @Html.LabelFor(x => x.Totalhours):
  256. </td>
  257. <td>
  258. @Html.TextBoxFor(x => x.Totalhours, new TextBoxOptions { IsEnabled = false })
  259. </td>
  260. </tr>
  261. <tr>
  262. <td>
  263. @Html.LabelFor(x => x.TheoryWeeklyNum):
  264. </td>
  265. <td>
  266. @Html.TextBoxFor(x => x.TheoryWeeklyNum, new TextBoxOptions() { IsEnabled = isEnabled })
  267. </td>
  268. <td>
  269. @Html.LabelFor(x => x.PracticeWeeklyNum):
  270. </td>
  271. <td>
  272. @Html.TextBoxFor(x => x.PracticeWeeklyNum, new TextBoxOptions() { IsEnabled = isEnabled })
  273. </td>
  274. </tr>
  275. <tr>
  276. <td>
  277. @Html.LabelFor(x => x.TrialWeeklyNum):
  278. </td>
  279. <td>
  280. @Html.TextBoxFor(x => x.TrialWeeklyNum, new TextBoxOptions() { IsEnabled = isEnabled })
  281. </td>
  282. <td>
  283. @Html.LabelFor(x => x.SchoolweeksNum):
  284. </td>
  285. <td>
  286. @Html.TextBoxFor(x => x.SchoolweeksNum, new TextBoxOptions { IsEnabled = false })
  287. </td>
  288. </tr>
  289. <tr>
  290. <td style="color:red;">
  291. @Html.LabelFor(x => x.WeeklyHours):
  292. </td>
  293. <td>
  294. @Html.TextBoxFor(x => x.WeeklyHours, new TextBoxOptions() { IsEnabled = isEnabled })
  295. </td>
  296. <td style="color:red;">
  297. @Html.LabelFor(x => x.WeeklyNum):
  298. </td>
  299. <td>
  300. @Html.TextBoxFor(x => x.WeeklyNum, new TextBoxOptions() { IsEnabled = isEnabled })
  301. </td>
  302. </tr>
  303. <tr>
  304. <td>
  305. @Html.LabelFor(x => x.StartWeeklyNum):
  306. </td>
  307. <td>
  308. @Html.TextBoxFor(x => x.StartWeeklyNum, new TextBoxOptions() { IsEnabled = isEnabled })
  309. </td>
  310. <td>
  311. @Html.LabelFor(x => x.EndWeeklyNum):
  312. </td>
  313. <td>
  314. @Html.TextBoxFor(x => x.EndWeeklyNum, new TextBoxOptions() { IsEnabled = isEnabled })
  315. </td>
  316. </tr>
  317. <tr>
  318. <td colspan="4" style="padding:1px;height:10px;">
  319. <div id="otherExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  320. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  321. onclick="swapother();">
  322. </div>
  323. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapother();">
  324. 其它信息
  325. </div>
  326. </td>
  327. </tr>
  328. <tr>
  329. <td>
  330. @Html.LabelFor(x => x.IsSpecialtycore):
  331. </td>
  332. <td>
  333. @if (Request["type"] == "detail")
  334. {
  335. @Html.CheckBoxFor(x => x.IsSpecialtycore, new Dictionary<string, object>() { { "disabled", isEnabled } })
  336. }
  337. else
  338. {
  339. @Html.CheckBoxFor(x => x.IsSpecialtycore)
  340. }
  341. </td>
  342. <td>
  343. @Html.LabelFor(x => x.IsCooperation):
  344. </td>
  345. <td>
  346. @if (Request["type"] == "detail")
  347. {
  348. @Html.CheckBoxFor(x => x.IsCooperation, new Dictionary<string, object>() { { "disabled", isEnabled } })
  349. }
  350. else
  351. {
  352. @Html.CheckBoxFor(x => x.IsCooperation)
  353. }
  354. </td>
  355. </tr>
  356. <tr>
  357. <td>
  358. @Html.LabelFor(x => x.IsRequired):
  359. </td>
  360. <td>
  361. @if (Request["type"] == "detail")
  362. {
  363. @Html.CheckBoxFor(x => x.IsRequired, new Dictionary<string, object>() { { "disabled", isEnabled } })
  364. }
  365. else
  366. {
  367. @Html.CheckBoxFor(x => x.IsRequired)
  368. }
  369. </td>
  370. <td>
  371. @Html.LabelFor(x => x.IsElective):
  372. </td>
  373. <td>
  374. @if (Request["type"] == "detail")
  375. {
  376. @Html.CheckBoxFor(x => x.IsElective, new Dictionary<string, object>() { { "disabled", isEnabled } })
  377. }
  378. else
  379. {
  380. @Html.CheckBoxFor(x => x.IsElective)
  381. }
  382. </td>
  383. </tr>
  384. <tr>
  385. <td>
  386. @Html.LabelFor(x => x.IsNetworkCourse):
  387. </td>
  388. <td>
  389. @if (Request["type"] == "detail")
  390. {
  391. @Html.CheckBoxFor(x => x.IsNetworkCourse, new Dictionary<string, object>() { { "disabled", isEnabled } })
  392. }
  393. else
  394. {
  395. @Html.CheckBoxFor(x => x.IsNetworkCourse)
  396. }
  397. </td>
  398. <td>
  399. @Html.LabelFor(x => x.IsMainCourse):
  400. </td>
  401. <td>
  402. @if (Request["type"] == "detail")
  403. {
  404. @Html.CheckBoxFor(x => x.IsMainCourse, new Dictionary<string, object>() { { "disabled", isEnabled } })
  405. }
  406. else
  407. {
  408. @Html.CheckBoxFor(x => x.IsMainCourse)
  409. }
  410. </td>
  411. </tr>
  412. <tr>
  413. <td>
  414. @Html.LabelFor(x => x.IsNeedMaterial):
  415. </td>
  416. <td>
  417. @if (Request["type"] == "detail")
  418. {
  419. @Html.CheckBoxFor(x => x.IsNeedMaterial, new Dictionary<string, object>() { { "disabled", isEnabled } })
  420. }
  421. else
  422. {
  423. @Html.CheckBoxFor(x => x.IsNeedMaterial)
  424. }
  425. </td>
  426. <td>
  427. @Html.LabelFor(x => x.CourseFineID):
  428. </td>
  429. <td>
  430. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseFine, x => x.CourseFineID, new DropdownListOptions() { IsEnabled = isEnabled })
  431. </td>
  432. </tr>
  433. <tr>
  434. <td>
  435. @Html.LabelFor(x => x.PracticeTypeID):
  436. </td>
  437. <td>
  438. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EM_PracticeType, x => x.PracticeTypeID, new DropdownListOptions() { IsEnabled = isEnabled })
  439. </td>
  440. <td>
  441. @Html.LabelFor(x => x.TeachinglanguageID):
  442. </td>
  443. <td>
  444. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Teachinglanguage, x => x.TeachinglanguageID, new DropdownListOptions() { IsEnabled = isEnabled })
  445. </td>
  446. </tr>
  447. <tr>
  448. <td>
  449. @Html.LabelFor(x => x.ExaminationModeID):
  450. </td>
  451. <td>
  452. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExaminationMode, x => x.ExaminationModeID, new DropdownListOptions() { IsEnabled = isEnabled })
  453. </td>
  454. <td>
  455. @Html.LabelFor(x => x.ResultTypeID):
  456. </td>
  457. <td>
  458. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ResultType, x => x.ResultTypeID, new DropdownListOptions() { IsEnabled = isEnabled })
  459. </td>
  460. </tr>
  461. <tr>
  462. <td style="color:red;">
  463. @Html.LabelFor(x => x.IsEnable):
  464. </td>
  465. <td colspan="3">
  466. @if (Request["type"] == "detail")
  467. {
  468. @Html.CheckBoxFor(x => x.IsEnable, new Dictionary<string, object>() { { "disabled", isEnabled } })
  469. }
  470. else
  471. {
  472. @Html.CheckBoxFor(x => x.IsEnable)
  473. }
  474. </td>
  475. </tr>
  476. <tr>
  477. <td>
  478. @Html.LabelFor(x => x.TeachingModeIDList):
  479. </td>
  480. <td colspan="3">
  481. @Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.CF_TeachingMode, lcoptm)
  482. </td>
  483. </tr>
  484. <tr>
  485. <td>
  486. @Html.LabelFor(x => x.TeachingPlaceIDList):
  487. </td>
  488. <td colspan="3">
  489. @Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.EM_TeachingPlace, lcoptp)
  490. </td>
  491. </tr>
  492. <tr>
  493. <td>
  494. @Html.LabelFor(x => x.Remark):
  495. </td>
  496. <td colspan="3">
  497. @if (Request["type"] == "detail")
  498. {
  499. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  500. {
  501. { "style", "width: 90%;min-height: 35px" },
  502. { "disabled", "true" }
  503. })
  504. }
  505. else
  506. {
  507. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  508. {
  509. { "style", "width: 90%;min-height: 35px" }
  510. })
  511. }
  512. </td>
  513. </tr>
  514. </table>
  515. </div>
  516. }
  517. </div>