Edit.cshtml 23 KB

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