ExecutableMinorPlanView.cs 18 KB

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