MinorPlanApplyView.cs 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel;
  6. using EMIS.ViewModel.CacheManage;
  7. using System.ComponentModel.DataAnnotations;
  8. namespace EMIS.ViewModel.MinorManage.MinorPlanManage
  9. {
  10. public class MinorPlanApplyView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. public Guid? GradeMinorApplicationID { get; set; }
  16. /// <summary>
  17. /// 辅修计划申请ID
  18. /// </summary>
  19. public Guid? MinorPlanApplicationID { get; set; }
  20. /// <summary>
  21. /// 辅修课程主键
  22. /// </summary>
  23. public Guid? MinorCourseID { get; set; }
  24. /// <summary>
  25. /// 年级
  26. /// </summary>
  27. [Required]
  28. [DisplayName("年级")]
  29. public int? YearID { get; set; }
  30. /// <summary>
  31. /// 源年级
  32. /// </summary>
  33. [Required]
  34. [DisplayName("源年级")]
  35. public int? GrademajorBeForeYear { get; set; }
  36. /// <summary>
  37. /// 目标年级
  38. /// </summary>
  39. [Required]
  40. [DisplayName("目标年级")]
  41. public int? GrademajorAfterYear { get; set; }
  42. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  43. public Guid? BeForeCollegeID { get; set; }
  44. /// <summary>
  45. /// 专业代码
  46. /// </summary>
  47. [Required]
  48. [DisplayName("专业代码")]
  49. public int? StandardID { get; set; }
  50. /// <summary>
  51. /// 专业代码
  52. /// </summary>
  53. [DisplayName("专业代码")]
  54. public string StandardCode
  55. {
  56. get
  57. {
  58. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  59. .Where(x => x.Value == StandardID)
  60. .Select(x => x.Code).FirstOrDefault();
  61. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  62. }
  63. }
  64. /// <summary>
  65. /// 专业名称
  66. /// </summary>
  67. [DisplayName("专业名称")]
  68. public string StandardName
  69. {
  70. get
  71. {
  72. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  73. .Where(x => x.Value == StandardID)
  74. .Select(x => x.Name).FirstOrDefault();
  75. }
  76. }
  77. /// <summary>
  78. /// 院系所
  79. /// </summary>
  80. [Required]
  81. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  82. public Guid? CollegeID { get; set; }
  83. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  84. public string CollegeNo { get; set; }
  85. /// <summary>
  86. /// 院系所
  87. /// </summary>
  88. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  89. public string CollegeName { get; set; }
  90. /// <summary>
  91. /// 教研室
  92. /// </summary>
  93. [Required]
  94. [DisplayName("教研室")]
  95. public Guid? DepartmentID { get; set; }
  96. /// <summary>
  97. /// 课程类型
  98. /// </summary>
  99. [Required]
  100. [DisplayName("课程类型")]
  101. public int? CourseTypeID { get; set; }
  102. [DisplayName("课程类型")]
  103. public string CourseTypeStr { get; set; }
  104. /// <summary>
  105. /// 课程类型名称
  106. /// </summary>
  107. [DisplayName("课程类型名称")]
  108. public string CourseTypeName
  109. {
  110. get
  111. {
  112. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseType.ToString())
  113. .Where(x => x.Value == CourseTypeID)
  114. .Select(x => x.Name).FirstOrDefault();
  115. }
  116. }
  117. /// <summary>
  118. /// 课程结构
  119. /// </summary>
  120. [DisplayName("课程结构")]
  121. public int? CourseStructureID { get; set; }
  122. [DisplayName("课程结构")]
  123. public string CourseStructureNameStr { get; set; }
  124. /// <summary>
  125. /// 课程结构
  126. /// </summary>
  127. [DisplayName("课程结构")]
  128. public string CourseStructureName
  129. {
  130. get
  131. {
  132. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseStructure.ToString())
  133. .Where(x => x.Value == CourseStructureID)
  134. .Select(x => x.Name).FirstOrDefault();
  135. }
  136. }
  137. /// <summary>
  138. /// 课程资料
  139. /// </summary>
  140. [Required]
  141. [DisplayName("课程资料")]
  142. public Guid? CoursematerialID { get; set; }
  143. /// <summary>
  144. /// 课程资料代码
  145. /// </summary>
  146. [DisplayName("课程资料代码")]
  147. public string CourseCode { get; set; }
  148. /// <summary>
  149. /// 课程名称
  150. /// </summary>
  151. [DisplayName("课程名称")]
  152. public string CourseName { get; set; }
  153. /// <summary>
  154. /// 课程类别
  155. /// </summary>
  156. [Required]
  157. [DisplayName("课程属性")]
  158. public int? CourseCategoryID { get; set; }
  159. [DisplayName("课程属性")]
  160. public string CourseCategoryNameStr { get; set; }
  161. /// <summary>
  162. /// 课程类别
  163. /// </summary>
  164. [DisplayName("课程属性")]
  165. public string CourseCategoryName
  166. {
  167. get
  168. {
  169. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseCategory.ToString())
  170. .Where(x => x.Value == CourseCategoryID)
  171. .Select(x => x.Name).FirstOrDefault();
  172. }
  173. }
  174. /// <summary>
  175. /// 课程性质
  176. /// </summary>
  177. [Required]
  178. [DisplayName("课程性质")]
  179. public int? CourseQualityID { get; set; }
  180. [DisplayName("课程性质名称")]
  181. public string CourseQualityNameStr { get; set; }
  182. /// <summary>
  183. /// 课程性质
  184. /// </summary>
  185. [DisplayName("课程性质名称")]
  186. public string CourseQualityName
  187. {
  188. get
  189. {
  190. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseQuality.ToString())
  191. .Where(x => x.Value == CourseQualityID)
  192. .Select(x => x.Name).FirstOrDefault();
  193. }
  194. }
  195. /// <summary>
  196. /// 考试方式
  197. /// </summary>
  198. [Required]
  199. [DisplayName("考试方式")]
  200. public int? ExaminationModeID { get; set; }
  201. [DisplayName("考试方式名称")]
  202. public string ExaminationModeNameStr { get; set; }
  203. /// <summary>
  204. /// 考试方式名称
  205. /// </summary>
  206. [DisplayName("考试方式名称")]
  207. public string ExaminationModeName
  208. {
  209. get
  210. {
  211. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString())
  212. .Where(x => x.Value == ExaminationModeID)
  213. .Select(x => x.Name).FirstOrDefault();
  214. }
  215. }
  216. /// <summary>
  217. /// 精品课程
  218. /// </summary>
  219. [DisplayName("精品课程")]
  220. public int? CourseFineID { get; set; }
  221. [DisplayName("精品课程")]
  222. public string CourseFineNameStr { get; set; }
  223. /// <summary>
  224. /// 精品课程
  225. /// </summary>
  226. [DisplayName("精品课程")]
  227. public string CourseFineName
  228. {
  229. get
  230. {
  231. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseFine.ToString())
  232. .Where(x => x.Value == CourseFineID)
  233. .Select(x => x.Name).FirstOrDefault();
  234. }
  235. }
  236. /// <summary>
  237. /// 是否专业核心
  238. /// </summary>
  239. [DisplayName("是否专业核心")]
  240. public bool IsSpecialtycore { get; set; }
  241. /// <summary>
  242. /// 是否专业核心
  243. /// </summary>
  244. [DisplayName("是否专业核心")]
  245. public string IsSpecialtycoreName { get; set; }
  246. /// <summary>
  247. /// 是否合作开发课
  248. /// </summary>
  249. [DisplayName("是否合作开发课")]
  250. public bool IsCooperation { get; set; }
  251. /// <summary>
  252. /// 是否合作开发课
  253. /// </summary>
  254. [DisplayName("是否合作开发课")]
  255. public string IsCooperationName { get; set; }
  256. /// <summary>
  257. /// 是否必修课
  258. /// </summary>
  259. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "IsRequired")]
  260. public bool IsRequired { get; set; }
  261. /// <summary>
  262. /// 是否必修课
  263. /// </summary>
  264. [DisplayName("是否必修课")]
  265. public string IsRequiredName { get; set; }
  266. /// <summary>
  267. /// 是否网上选修课
  268. /// </summary>
  269. [DisplayName("是否网上选修课")]
  270. public bool IsElective { get; set; }
  271. /// <summary>
  272. /// 是否网上选修课
  273. /// </summary>
  274. [DisplayName("是否网上选修课")]
  275. public string IsElectiveName { get; set; }
  276. /// <summary>
  277. /// 是否网络课程
  278. /// </summary>
  279. [DisplayName("是否网络课程")]
  280. public bool IsNetworkCourse { get; set; }
  281. /// <summary>
  282. /// 是否网络课程
  283. /// </summary>
  284. [DisplayName("是否网络课程")]
  285. public string IsNetworkCourseName { get; set; }
  286. /// <summary>
  287. /// 是否学位主干课
  288. /// </summary>
  289. [DisplayName("是否学位主干课")]
  290. public bool IsMainCourse { get; set; }
  291. /// <summary>
  292. /// 是否启用
  293. /// </summary>
  294. [DisplayName("是否启用")]
  295. public bool IsEnable { get; set; }
  296. /// <summary>
  297. /// 是否启用
  298. /// </summary>
  299. [DisplayName("是否启用")]
  300. public string IsEnableName
  301. {
  302. get
  303. {
  304. int value = 0;
  305. if (IsEnable == true)
  306. {
  307. value = 1;
  308. }
  309. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_GeneralPurpose.ToString())
  310. .Where(x => x.Value == value)
  311. .Select(x => x.Name).FirstOrDefault();
  312. }
  313. }
  314. /// <summary>
  315. /// 成绩类型
  316. /// </summary>
  317. [Required]
  318. [DisplayName("成绩类型")]
  319. public int? ResultTypeID { get; set; }
  320. /// <summary>
  321. /// 成绩类型
  322. /// </summary>
  323. [DisplayName("成绩类型")]
  324. public string ResultTypeName
  325. {
  326. get
  327. {
  328. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ResultType.ToString())
  329. .Where(x => x.Value == ResultTypeID)
  330. .Select(x => x.Name).FirstOrDefault();
  331. }
  332. }
  333. /// <summary>
  334. /// 实践类型
  335. /// </summary>
  336. [DisplayName("实践类型")]
  337. public int? PracticeTypeID { get; set; }
  338. [DisplayName("实践类型")]
  339. public string PracticeTypeNameStr { get; set; }
  340. /// <summary>
  341. /// 实践类型
  342. /// </summary>
  343. [DisplayName("实践类型")]
  344. public string PracticeTypeName
  345. {
  346. get
  347. {
  348. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_PracticeType.ToString())
  349. .Where(x => x.Value == PracticeTypeID)
  350. .Select(x => x.Name).FirstOrDefault();
  351. }
  352. }
  353. /// <summary>
  354. /// 授课语言
  355. /// </summary>
  356. [DisplayName("授课语言")]
  357. public int? TeachinglanguageID { get; set; }
  358. [DisplayName("授课语言")]
  359. public string TeachinglanguageNameStr { get; set; }
  360. /// <summary>
  361. /// 授课语言
  362. /// </summary>
  363. [DisplayName("授课语言")]
  364. public string TeachinglanguageName
  365. {
  366. get
  367. {
  368. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Teachinglanguage.ToString())
  369. .Where(x => x.Value == TeachinglanguageID)
  370. .Select(x => x.Name).FirstOrDefault();
  371. }
  372. }
  373. /// <summary>
  374. /// 学期
  375. /// </summary>
  376. [Required]
  377. [DisplayName("学期")]
  378. public int? SchoolcodeID { get; set; }
  379. [DisplayName("学期")]
  380. public string SchoolcodeStr { get; set; }
  381. /// <summary>
  382. /// 学期
  383. /// </summary>
  384. [DisplayName("学期")]
  385. public string SchoolcodeName
  386. {
  387. get
  388. {
  389. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Semester.ToString()).Where(x => x.Value == SchoolcodeID).Select(x => x.Name).FirstOrDefault();
  390. }
  391. }
  392. /// <summary>
  393. /// 开课学期
  394. /// </summary>
  395. [Required]
  396. [DisplayName("开课学期")]
  397. public int? StarttermID { get; set; }
  398. /// <summary>
  399. /// 开课学期名称
  400. /// </summary>
  401. [DisplayName("开课学期")]
  402. public string StarttermName
  403. {
  404. get
  405. {
  406. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Startterm.ToString())
  407. .Where(x => x.Value == StarttermID)
  408. .Select(x => x.Name).FirstOrDefault();
  409. }
  410. }
  411. /// <summary>
  412. /// 开课学年
  413. /// </summary>
  414. [Required]
  415. [DisplayName("开课学年")]
  416. public int? SchoolyearNumID { get; set; }
  417. [DisplayName("开课学年")]
  418. public string SchoolyearNumNameStr { get; set; }
  419. /// <summary>
  420. /// 开课学年
  421. /// </summary>
  422. [DisplayName("开课学年")]
  423. public string SchoolyearNumName
  424. {
  425. get
  426. {
  427. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString())
  428. .Where(x => x.Value == SchoolyearNumID)
  429. .Select(x => x.Name).FirstOrDefault();
  430. }
  431. }
  432. /// <summary>
  433. /// 学分
  434. /// </summary>
  435. [Required]
  436. [DisplayName("学分")]
  437. [DisplayFormat(DataFormatString = "{0:#.0}")]
  438. [RegularExpression(@"^\d+(\.\d{1,1})?$", ErrorMessage = "请输整数或保留1位小数")]
  439. public decimal? Credit { get; set; }
  440. [DisplayName("学分")]
  441. public string CreditStr { get; set; }
  442. /// <summary>
  443. /// 总学时
  444. /// </summary>
  445. [DisplayName("总学时")]
  446. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  447. public int? Totalhours { get; set; }
  448. /// <summary>
  449. /// 理论学时
  450. /// </summary>
  451. [Required]
  452. [DisplayName("理论学时")]
  453. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  454. public int? TheoryCourse { get; set; }
  455. [DisplayName("理论学时")]
  456. public string TheoryCourseStr { get; set; }
  457. /// <summary>
  458. /// 实践学时
  459. /// </summary>
  460. [Required]
  461. [DisplayName("实践学时")]
  462. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  463. public int? Practicehours { get; set; }
  464. [DisplayName("实践学时")]
  465. public string PracticehoursStr { get; set; }
  466. /// <summary>
  467. /// 实验学时
  468. /// </summary>
  469. [Required]
  470. [DisplayName("实验学时")]
  471. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  472. public int? Trialhours { get; set; }
  473. [DisplayName("实验学时")]
  474. public string TrialhoursStr { get; set; }
  475. /// <summary>
  476. /// 总周次
  477. /// </summary>
  478. [DisplayName("总周次")]
  479. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  480. public int? SchoolweeksNum { get; set; }
  481. /// <summary>
  482. /// 每周次数
  483. /// </summary>
  484. [DisplayName("每周次数")]
  485. public int? WeeklyNum { get; set; }
  486. /// <summary>
  487. /// 理论周次
  488. /// </summary>
  489. [DisplayName("理论周次")]
  490. public int? TheoryWeeklyNum { get; set; }
  491. /// <summary>
  492. /// 实践周次
  493. /// </summary>
  494. [DisplayName("实践周次")]
  495. public int? PracticeWeeklyNum { get; set; }
  496. /// <summary>
  497. /// 实验周次
  498. /// </summary>
  499. [DisplayName("实验周次")]
  500. public int? TrialWeeklyNum { get; set; }
  501. /// <summary>
  502. /// 开始周次
  503. /// </summary>
  504. [DisplayName("开始周次")]
  505. [Required]
  506. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  507. public int? StartWeeklyNum { get; set; }
  508. /// <summary>
  509. /// 结束周次
  510. /// </summary>
  511. [DisplayName("结束周次")]
  512. [Required]
  513. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
  514. public int? EndWeeklyNum { get; set; }
  515. /// <summary>
  516. /// 周学时
  517. /// </summary>
  518. [DisplayName("周学时")]
  519. public int? WeeklyHours { get; set; }
  520. /// <summary>
  521. /// 学年学期ID
  522. /// </summary>
  523. public Guid? SchoolyearID { get; set; }
  524. /// <summary>
  525. /// 学年学期ID
  526. /// </summary>
  527. public string SchoolyearCode { get; set; }
  528. /// <summary>
  529. /// 人数上限
  530. /// </summary>
  531. [Required]
  532. [DisplayName("人数上限")]
  533. public int? StudentLimit { get; set; }
  534. /// <summary>
  535. /// 处理方式
  536. /// </summary>
  537. [Required]
  538. [DisplayName("处理方式")]
  539. public int? HandleModeID { get; set; }
  540. /// <summary>
  541. /// 处理方式
  542. /// </summary>
  543. [DisplayName("处理方式")]
  544. public string HandleModeName
  545. {
  546. get
  547. {
  548. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HandleMode.ToString())
  549. .Where(x => x.Value == HandleModeID)
  550. .Select(x => x.Name).FirstOrDefault();
  551. }
  552. }
  553. /// <summary>
  554. /// 是否需要教材
  555. /// </summary>
  556. [DisplayName("是否需要教材")]
  557. public bool IsNeedMaterial { get; set; }
  558. /// <summary>
  559. /// 是否需要教材
  560. /// </summary>
  561. [DisplayName("是否需要教材")]
  562. public string IsNeedMaterialName
  563. {
  564. get { return this.IsNeedMaterial != true ? "否" : "是"; }
  565. }
  566. /// <summary>
  567. /// 审批状态
  568. /// </summary>
  569. [DisplayName("审批状态")]
  570. public int? ApprovalStatus { get; set; }
  571. /// <summary>
  572. /// 审批状态
  573. /// </summary>
  574. [DisplayName("审批状态")]
  575. public string ApprovalStatusName { get; set; }
  576. /// <summary>
  577. /// 备注
  578. /// </summary>
  579. [DisplayName("备注")]
  580. public string Remarks { get; set; }
  581. /// <summary>
  582. /// 创建人
  583. /// </summary>
  584. [DisplayName("创建人")]
  585. public Guid? CreateUserID { get; set; }
  586. /// <summary>
  587. /// 创建人姓名
  588. /// </summary>
  589. [DisplayName("创建人姓名")]
  590. public string CreateUserName { get; set; }
  591. /// <summary>
  592. /// 创建时间
  593. /// </summary>
  594. [DisplayName("创建时间")]
  595. public DateTime? CreateTime { get; set; }
  596. }
  597. }