Edit.cshtml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. @model EMIS.ViewModel.CultureplanManage.PlanManagement.SpecialtyPlanView
  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 : (Request["type"] == "edit" ? 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 = Request["type"] == "detail" ? false : (Request["type"] == "edit" ? false : true),
  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("~/AdultSpecialtyPlan/TeachingModeTypeList?specialtyPlanID=" + Model.SpecialtyPlanID)
  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("~/AdultSpecialtyPlan/TeachingPlaceList?specialtyPlanID=" + Model.SpecialtyPlanID)
  96. };
  97. }
  98. @section scripts{
  99. <script src="~/Scripts/Business/CultureplanManage/AdultSpecialtyPlanEdit.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.SpecialtyPlanID)
  123. <table cellpadding="0" cellspacing="0" id="specialtyplantable">
  124. <tr>
  125. <td style="color: red;">
  126. @Html.LabelFor(x => x.SchoolyearCode):
  127. </td>
  128. <td>
  129. @Html.DropdownListFor((x => x.SchoolyearID), new DropdownListOptions
  130. {
  131. BindType = DropdownListBindType.PleaseSelect,
  132. TextField = "Text",
  133. ValueField = "Value",
  134. IsEnabled = Request["type"] == "detail" ? false : (Request["type"] == "edit" ? false : true),
  135. ItemSourceUrl = Url.Content("~/SchoolYear/YearsDropdownListBanid")
  136. })
  137. </td>
  138. <td style="color:red;">
  139. @Html.LabelFor(x => x.StartSchoolcodeName):
  140. </td>
  141. <td>
  142. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Semester, (x => x.StartSchoolcodeID),
  143. new DropdownListOptions()
  144. {
  145. IsEnabled = Request["type"] == "detail" ? false : (Request["type"] == "edit" ? false : true)
  146. })
  147. </td>
  148. </tr>
  149. <tr>
  150. <td style="color:red;">
  151. @Html.LabelFor(x => x.GradeID):
  152. </td>
  153. <td>
  154. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Grade, (x => x.GradeID),
  155. new DropdownListOptions()
  156. {
  157. IsEnabled = Request["type"] == "detail" ? false : (Request["type"] == "edit" ? false : true)
  158. })
  159. </td>
  160. <td style="color:red;">
  161. @Html.LabelFor(x => x.StandardName):
  162. </td>
  163. <td>
  164. @Html.ComboGridFor(x => x.SpecialtyID, cgopSpecialty)
  165. </td>
  166. </tr>
  167. <tr>
  168. <td>
  169. @Html.LabelFor(x => x.StandardCode):
  170. </td>
  171. <td>
  172. @Html.TextBoxFor(x => x.StandardCode, new TextBoxOptions() { IsEnabled = false })
  173. </td>
  174. <td>
  175. @Html.LabelFor(x => x.EducationID):
  176. </td>
  177. <td>
  178. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Education, (x => x.EducationID), new DropdownListOptions() { IsEnabled = false })
  179. </td>
  180. </tr>
  181. <tr>
  182. <td>
  183. @Html.LabelFor(x => x.LearningformID):
  184. </td>
  185. <td>
  186. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Learningform, (x => x.LearningformID), new DropdownListOptions() { IsEnabled = false })
  187. </td>
  188. <td>
  189. @Html.LabelFor(x => x.LearnSystem):
  190. </td>
  191. <td>
  192. @Html.TextBoxFor(x => x.LearnSystem, new TextBoxOptions() { IsEnabled = false })
  193. </td>
  194. </tr>
  195. <tr>
  196. <td style="color:red;">
  197. @Html.LabelFor(x => x.CourseName):
  198. </td>
  199. <td>
  200. @Html.ComboGridFor(x => x.CoursematerialID, cgopCourse)
  201. </td>
  202. <td style="color:red;">
  203. @Html.LabelFor(x => x.DepartmentName):
  204. </td>
  205. <td>
  206. @Html.ComboGridFor(x => x.DepartmentID, cgopDepartment)
  207. </td>
  208. </tr>
  209. <tr>
  210. <td>
  211. @Html.LabelFor(x => x.CourseStructureName):
  212. </td>
  213. <td>
  214. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseStructure, x => x.CourseStructureID, new DropdownListOptions() { IsEnabled = isEnabled })
  215. </td>
  216. <td>
  217. @Html.LabelFor(x => x.CourseCategoryName):
  218. </td>
  219. <td>
  220. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseCategory, x => x.CourseCategoryID, new DropdownListOptions() { IsEnabled = isEnabled })
  221. </td>
  222. </tr>
  223. <tr>
  224. <td style="color:red;">
  225. @Html.LabelFor(x => x.CourseTypeName):
  226. </td>
  227. <td>
  228. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseType, x => x.CourseTypeID, new DropdownListOptions() { IsEnabled = isEnabled })
  229. </td>
  230. <td>
  231. @Html.LabelFor(x => x.CourseQualityName):
  232. </td>
  233. <td>
  234. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseQuality, x => x.CourseQualityID, new DropdownListOptions() { IsEnabled = isEnabled })
  235. </td>
  236. </tr>
  237. <tr>
  238. <td colspan="4" style="padding:1px;height:10px;">
  239. <div id="teachingSettingExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  240. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  241. onclick="swapTeachingSetting();">
  242. </div>
  243. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapTeachingSetting();">
  244. 教学设置信息
  245. </div>
  246. </td>
  247. </tr>
  248. <tr>
  249. <td style="color:red;">
  250. @Html.LabelFor(x => x.Credit):
  251. </td>
  252. <td>
  253. @Html.TextBoxFor(x => x.Credit, new TextBoxOptions() { IsEnabled = isEnabled })
  254. </td>
  255. <td style="color:red;">
  256. @Html.LabelFor(x => x.HandleModeName):
  257. </td>
  258. <td>
  259. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_HandleMode, (x => x.HandleModeID), new DropdownListOptions() { IsEnabled = isEnabled })
  260. </td>
  261. </tr>
  262. <tr>
  263. <td>
  264. @Html.LabelFor(x => x.TheoryCourse):
  265. </td>
  266. <td>
  267. @Html.TextBoxFor(x => x.TheoryCourse, new TextBoxOptions() { IsEnabled = isEnabled })
  268. </td>
  269. <td>
  270. @Html.LabelFor(x => x.Practicehours):
  271. </td>
  272. <td>
  273. @Html.TextBoxFor(x => x.Practicehours, new TextBoxOptions() { IsEnabled = isEnabled })
  274. </td>
  275. </tr>
  276. <tr>
  277. <td>
  278. @Html.LabelFor(x => x.Trialhours):
  279. </td>
  280. <td>
  281. @Html.TextBoxFor(x => x.Trialhours, new TextBoxOptions() { IsEnabled = isEnabled })
  282. </td>
  283. <td>
  284. @Html.LabelFor(x => x.Totalhours):
  285. </td>
  286. <td>
  287. @Html.TextBoxFor(x => x.Totalhours, new TextBoxOptions { IsEnabled = false })
  288. </td>
  289. </tr>
  290. <tr>
  291. <td>
  292. @Html.LabelFor(x => x.TheoryWeeklyNum):
  293. </td>
  294. <td>
  295. @Html.TextBoxFor(x => x.TheoryWeeklyNum, new TextBoxOptions() { IsEnabled = isEnabled })
  296. </td>
  297. <td>
  298. @Html.LabelFor(x => x.PracticeWeeklyNum):
  299. </td>
  300. <td>
  301. @Html.TextBoxFor(x => x.PracticeWeeklyNum, new TextBoxOptions() { IsEnabled = isEnabled })
  302. </td>
  303. </tr>
  304. <tr>
  305. <td>
  306. @Html.LabelFor(x => x.TrialWeeklyNum):
  307. </td>
  308. <td>
  309. @Html.TextBoxFor(x => x.TrialWeeklyNum, new TextBoxOptions() { IsEnabled = isEnabled })
  310. </td>
  311. <td>
  312. @Html.LabelFor(x => x.SchoolweeksNum):
  313. </td>
  314. <td>
  315. @Html.TextBoxFor(x => x.SchoolweeksNum, new TextBoxOptions { IsEnabled = false })
  316. </td>
  317. </tr>
  318. <tr>
  319. <td style="color:red;">
  320. @Html.LabelFor(x => x.WeeklyHours):
  321. </td>
  322. <td>
  323. @Html.TextBoxFor(x => x.WeeklyHours, new TextBoxOptions() { IsEnabled = isEnabled })
  324. </td>
  325. <td style="color:red;">
  326. @Html.LabelFor(x => x.WeeklyNum):
  327. </td>
  328. <td>
  329. @Html.TextBoxFor(x => x.WeeklyNum, new TextBoxOptions() { IsEnabled = isEnabled })
  330. </td>
  331. </tr>
  332. <tr>
  333. <td>
  334. @Html.LabelFor(x => x.StartWeeklyNum):
  335. </td>
  336. <td>
  337. @Html.TextBoxFor(x => x.StartWeeklyNum, new TextBoxOptions() { IsEnabled = isEnabled })
  338. </td>
  339. <td>
  340. @Html.LabelFor(x => x.EndWeeklyNum):
  341. </td>
  342. <td>
  343. @Html.TextBoxFor(x => x.EndWeeklyNum, new TextBoxOptions() { IsEnabled = isEnabled })
  344. </td>
  345. </tr>
  346. <tr>
  347. <td colspan="4" style="padding:1px;height:10px;">
  348. <div id="otherExpander" style="width: 16px; float: left; height: 16px; cursor: pointer;
  349. background: url('../../Content/Bowin.Control.Core/themes/metro-blue/images/tree_icons.png') no-repeat -32px 0;"
  350. onclick="swapother();">
  351. </div>
  352. <div style="float: left;height: 10px; cursor: pointer; color: red;" onclick="swapother();">
  353. 其它信息
  354. </div>
  355. </td>
  356. </tr>
  357. <tr>
  358. <td>
  359. @Html.LabelFor(x => x.IsSpecialtycore):
  360. </td>
  361. <td>
  362. @if (Request["type"] == "detail")
  363. {
  364. @Html.CheckBoxFor(x => x.IsSpecialtycore, new Dictionary<string, object>() { { "disabled", isEnabled } })
  365. }
  366. else
  367. {
  368. @Html.CheckBoxFor(x => x.IsSpecialtycore)
  369. }
  370. </td>
  371. <td>
  372. @Html.LabelFor(x => x.IsCooperation):
  373. </td>
  374. <td>
  375. @if (Request["type"] == "detail")
  376. {
  377. @Html.CheckBoxFor(x => x.IsCooperation, new Dictionary<string, object>() { { "disabled", isEnabled } })
  378. }
  379. else
  380. {
  381. @Html.CheckBoxFor(x => x.IsCooperation)
  382. }
  383. </td>
  384. </tr>
  385. <tr>
  386. <td>
  387. @Html.LabelFor(x => x.IsRequired):
  388. </td>
  389. <td>
  390. @if (Request["type"] == "detail")
  391. {
  392. @Html.CheckBoxFor(x => x.IsRequired, new Dictionary<string, object>() { { "disabled", isEnabled } })
  393. }
  394. else
  395. {
  396. @Html.CheckBoxFor(x => x.IsRequired)
  397. }
  398. </td>
  399. <td>
  400. @Html.LabelFor(x => x.IsElective):
  401. </td>
  402. <td>
  403. @if (Request["type"] == "detail")
  404. {
  405. @Html.CheckBoxFor(x => x.IsElective, new Dictionary<string, object>() { { "disabled", isEnabled } })
  406. }
  407. else
  408. {
  409. @Html.CheckBoxFor(x => x.IsElective)
  410. }
  411. </td>
  412. </tr>
  413. <tr>
  414. <td>
  415. @Html.LabelFor(x => x.IsNetworkCourse):
  416. </td>
  417. <td>
  418. @if (Request["type"] == "detail")
  419. {
  420. @Html.CheckBoxFor(x => x.IsNetworkCourse, new Dictionary<string, object>() { { "disabled", isEnabled } })
  421. }
  422. else
  423. {
  424. @Html.CheckBoxFor(x => x.IsNetworkCourse)
  425. }
  426. </td>
  427. <td>
  428. @Html.LabelFor(x => x.IsMainCourse):
  429. </td>
  430. <td>
  431. @if (Request["type"] == "detail")
  432. {
  433. @Html.CheckBoxFor(x => x.IsMainCourse, new Dictionary<string, object>() { { "disabled", isEnabled } })
  434. }
  435. else
  436. {
  437. @Html.CheckBoxFor(x => x.IsMainCourse)
  438. }
  439. </td>
  440. </tr>
  441. <tr>
  442. <td>
  443. @Html.LabelFor(x => x.IsNeedMaterial):
  444. </td>
  445. <td>
  446. @if (Request["type"] == "detail")
  447. {
  448. @Html.CheckBoxFor(x => x.IsNeedMaterial, new Dictionary<string, object>() { { "disabled", isEnabled } })
  449. }
  450. else
  451. {
  452. @Html.CheckBoxFor(x => x.IsNeedMaterial)
  453. }
  454. </td>
  455. <td>
  456. @Html.LabelFor(x => x.CourseFineID):
  457. </td>
  458. <td>
  459. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_CourseFine, x => x.CourseFineID, new DropdownListOptions() { IsEnabled = isEnabled })
  460. </td>
  461. </tr>
  462. <tr>
  463. <td>
  464. @Html.LabelFor(x => x.PracticeTypeID):
  465. </td>
  466. <td>
  467. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.EM_PracticeType, x => x.PracticeTypeID, new DropdownListOptions() { IsEnabled = isEnabled })
  468. </td>
  469. <td>
  470. @Html.LabelFor(x => x.TeachinglanguageID):
  471. </td>
  472. <td>
  473. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_Teachinglanguage, x => x.TeachinglanguageID, new DropdownListOptions() { IsEnabled = isEnabled })
  474. </td>
  475. </tr>
  476. <tr>
  477. <td>
  478. @Html.LabelFor(x => x.ExaminationModeID):
  479. </td>
  480. <td>
  481. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ExaminationMode, x => x.ExaminationModeID, new DropdownListOptions() { IsEnabled = isEnabled })
  482. </td>
  483. <td>
  484. @Html.LabelFor(x => x.ResultTypeID):
  485. </td>
  486. <td>
  487. @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_ResultType, (x => x.ResultTypeID), new DropdownListOptions() { IsEnabled = isEnabled })
  488. </td>
  489. </tr>
  490. <tr>
  491. <td>
  492. @Html.LabelFor(x => x.TeachingModeIDList):
  493. </td>
  494. <td colspan="3">
  495. @Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.CF_TeachingMode, lcoptm)
  496. </td>
  497. </tr>
  498. <tr>
  499. <td>
  500. @Html.LabelFor(x => x.TeachingPlaceIDList):
  501. </td>
  502. <td colspan="3">
  503. @Html.DictionaryCheckList(EMIS.ViewModel.DictionaryItem.EM_TeachingPlace, lcoptp)
  504. </td>
  505. </tr>
  506. <tr>
  507. <td>
  508. @Html.LabelFor(x => x.Remark):
  509. </td>
  510. <td colspan="3">
  511. @if (Request["type"] == "detail")
  512. {
  513. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  514. {
  515. { "style", "width: 90%;min-height: 35px" },
  516. { "disabled", "true" }
  517. })
  518. }
  519. else
  520. {
  521. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  522. {
  523. { "style", "width: 90%;min-height: 35px" }
  524. })
  525. }
  526. </td>
  527. </tr>
  528. </table>
  529. </div>
  530. }
  531. </div>