SpecialtyCourseView.cs 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928
  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 System.Web.Mvc;
  8. using EMIS.ViewModel.CacheManage;
  9. namespace EMIS.ViewModel.CultureplanManage
  10. {
  11. public class SpecialtyCourseView
  12. {
  13. /// <summary>
  14. /// 主键ID
  15. /// </summary>
  16. [DisplayName("主键ID")]
  17. public Guid SpecialtyCourseID { get; set; }
  18. /// <summary>
  19. /// 专业信息ID
  20. /// </summary>
  21. [Required]
  22. [DisplayName("专业信息ID")]
  23. public Guid? SpecialtyID { get; set; }
  24. /// <summary>
  25. /// 专业ID(Value)
  26. /// </summary>
  27. [DisplayName("专业ID(Value)")]
  28. public int? StandardID { get; set; }
  29. /// <summary>
  30. /// 专业代码
  31. /// </summary>
  32. [DisplayName("专业代码")]
  33. public string StandardCode
  34. {
  35. get
  36. {
  37. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  38. .Where(x => x.Value == StandardID)
  39. .Select(x => x.Code).FirstOrDefault();
  40. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  41. }
  42. }
  43. /// <summary>
  44. /// 专业代码(Excel导入)
  45. /// </summary>
  46. [DisplayName("专业代码")]
  47. public string StandardCodeStr { get; set; }
  48. /// <summary>
  49. /// 专业名称
  50. /// </summary>
  51. [DisplayName("专业名称")]
  52. public string StandardName { get; set; }
  53. /// <summary>
  54. /// 专业名称(Excel导入)
  55. /// </summary>
  56. [DisplayName("专业名称")]
  57. public string StandardNameStr { get; set; }
  58. /// <summary>
  59. /// 培养层次
  60. /// </summary>
  61. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  62. public int? EducationID { get; set; }
  63. /// <summary>
  64. /// 培养层次(Excel导入)
  65. /// </summary>
  66. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  67. public string EducationStr { get; set; }
  68. /// <summary>
  69. /// 培养层次
  70. /// </summary>
  71. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  72. public string EducationName
  73. {
  74. get
  75. {
  76. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  77. .Where(x => x.Value == EducationID)
  78. .Select(x => x.Name).FirstOrDefault();
  79. }
  80. }
  81. /// <summary>
  82. /// 学习形式
  83. /// </summary>
  84. [DisplayName("学习形式")]
  85. public int? LearningformID { get; set; }
  86. /// <summary>
  87. /// 学习形式(Excel导入)
  88. /// </summary>
  89. [DisplayName("学习形式")]
  90. public string LearningformStr { get; set; }
  91. /// <summary>
  92. /// 学习形式
  93. /// </summary>
  94. [DisplayName("学习形式")]
  95. public string LearningformName
  96. {
  97. get
  98. {
  99. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  100. .Where(x => x.Value == LearningformID)
  101. .Select(x => x.Name).FirstOrDefault();
  102. }
  103. }
  104. /// <summary>
  105. /// 学制
  106. /// </summary>
  107. [DisplayName("学制")]
  108. public decimal? LearnSystem { get; set; }
  109. /// <summary>
  110. /// 学制(Excel导入)
  111. /// </summary>
  112. [DisplayName("学制")]
  113. public string LearnSystemStr { get; set; }
  114. /// <summary>
  115. /// 开课学年
  116. /// </summary>
  117. [DisplayName("开课学年")]
  118. public int? SchoolyearNumID { get; set; }
  119. /// <summary>
  120. /// 开课学年
  121. /// </summary>
  122. [DisplayName("开课学年")]
  123. public string SchoolyearNumName
  124. {
  125. get
  126. {
  127. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString())
  128. .Where(x => x.Value == SchoolyearNumID)
  129. .Select(x => x.Name).FirstOrDefault();
  130. }
  131. }
  132. /// <summary>
  133. /// 学期
  134. /// </summary>
  135. [DisplayName("学期")]
  136. public int? SchoolcodeID { get; set; }
  137. /// <summary>
  138. /// 学期
  139. /// </summary>
  140. [DisplayName("学期")]
  141. public string SchoolcodeName
  142. {
  143. get
  144. {
  145. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Semester.ToString()).Where(x => x.Value == SchoolcodeID).Select(x => x.Name).FirstOrDefault();
  146. }
  147. }
  148. /// <summary>
  149. /// 开课学期
  150. /// </summary>
  151. [Required]
  152. [DisplayName("开课学期")]
  153. public int? StarttermID { get; set; }
  154. /// <summary>
  155. /// 开课学期(Excel导入)
  156. /// </summary>
  157. [DisplayName("开课学期")]
  158. public string StarttermStr { get; set; }
  159. /// <summary>
  160. /// 开课学期
  161. /// </summary>
  162. [DisplayName("开课学期")]
  163. public string StarttermName
  164. {
  165. get
  166. {
  167. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Startterm.ToString())
  168. .Where(x => x.Value == StarttermID)
  169. .Select(x => x.Name).FirstOrDefault();
  170. }
  171. }
  172. /// <summary>
  173. /// 课程信息ID
  174. /// </summary>
  175. [Required]
  176. [DisplayName("课程信息ID")]
  177. public Guid? CoursematerialID { get; set; }
  178. /// <summary>
  179. /// 课程代码
  180. /// </summary>
  181. [DisplayName("课程代码")]
  182. public string CourseCode { get; set; }
  183. /// <summary>
  184. /// 课程名称
  185. /// </summary>
  186. [DisplayName("课程名称")]
  187. public string CourseName { get; set; }
  188. /// <summary>
  189. /// 课程结构
  190. /// </summary>
  191. [DisplayName("课程结构")]
  192. public int? CourseStructureID { get; set; }
  193. /// <summary>
  194. /// 课程结构(Excel导入)
  195. /// </summary>
  196. [DisplayName("课程结构")]
  197. public string CourseStructureStr { get; set; }
  198. /// <summary>
  199. /// 课程结构
  200. /// </summary>
  201. [DisplayName("课程结构")]
  202. public string CourseStructureName
  203. {
  204. get
  205. {
  206. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseStructure.ToString())
  207. .Where(x => x.Value == CourseStructureID)
  208. .Select(x => x.Name).FirstOrDefault();
  209. }
  210. }
  211. /// <summary>
  212. /// 课程属性
  213. /// </summary>
  214. [DisplayName("课程属性")]
  215. public int? CourseCategoryID { get; set; }
  216. /// <summary>
  217. /// 课程属性(Excel导入)
  218. /// </summary>
  219. [DisplayName("课程属性")]
  220. public string CourseCategoryStr { get; set; }
  221. /// <summary>
  222. /// 课程属性
  223. /// </summary>
  224. [DisplayName("课程属性")]
  225. public string CourseCategoryName
  226. {
  227. get
  228. {
  229. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseCategory.ToString())
  230. .Where(x => x.Value == CourseCategoryID)
  231. .Select(x => x.Name).FirstOrDefault();
  232. }
  233. }
  234. /// <summary>
  235. /// 课程类型
  236. /// </summary>
  237. [Required]
  238. [DisplayName("课程类型")]
  239. public int? CourseTypeID { get; set; }
  240. /// <summary>
  241. /// 课程类型(Excel导入)
  242. /// </summary>
  243. [DisplayName("课程类型")]
  244. public string CourseTypeStr { get; set; }
  245. /// <summary>
  246. /// 课程类型
  247. /// </summary>
  248. [DisplayName("课程类型")]
  249. public string CourseTypeName
  250. {
  251. get
  252. {
  253. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseType.ToString())
  254. .Where(x => x.Value == CourseTypeID)
  255. .Select(x => x.Name).FirstOrDefault();
  256. }
  257. }
  258. /// <summary>
  259. /// 课程性质
  260. /// </summary>
  261. [DisplayName("课程性质")]
  262. public int? CourseQualityID { get; set; }
  263. /// <summary>
  264. /// 课程性质(Excel导入)
  265. /// </summary>
  266. [DisplayName("课程性质")]
  267. public string CourseQualityStr { get; set; }
  268. /// <summary>
  269. /// 课程性质
  270. /// </summary>
  271. [DisplayName("课程性质")]
  272. public string CourseQualityName
  273. {
  274. get
  275. {
  276. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseQuality.ToString())
  277. .Where(x => x.Value == CourseQualityID)
  278. .Select(x => x.Name).FirstOrDefault();
  279. }
  280. }
  281. /// <summary>
  282. /// 课程学分
  283. /// </summary>
  284. [Required]
  285. [DisplayName("课程学分")]
  286. //[DisplayFormat(DataFormatString = "{0:N1}")]
  287. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  288. public decimal? Credit { get; set; }
  289. /// <summary>
  290. /// 课程学分(Excel导入)
  291. /// </summary>
  292. [DisplayName("课程学分")]
  293. public string CreditStr { get; set; }
  294. /// <summary>
  295. /// 理论学时
  296. /// </summary>
  297. [Required]
  298. [DisplayName("理论学时")]
  299. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  300. public int? TheoryCourse { get; set; }
  301. /// <summary>
  302. /// 理论学时(Excel导入)
  303. /// </summary>
  304. [DisplayName("理论学时")]
  305. public string TheoryCourseStr { get; set; }
  306. /// <summary>
  307. /// 实践学时
  308. /// </summary>
  309. [Required]
  310. [DisplayName("实践学时")]
  311. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  312. public int? Practicehours { get; set; }
  313. /// <summary>
  314. /// 实践学时(Excel导入)
  315. /// </summary>
  316. [DisplayName("实践学时")]
  317. public string PracticehoursStr { get; set; }
  318. /// <summary>
  319. /// 实验学时
  320. /// </summary>
  321. [Required]
  322. [DisplayName("实验学时")]
  323. //[Compare("Practicehours")]
  324. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  325. public int? Trialhours { get; set; }
  326. /// <summary>
  327. /// 实验学时(Excel导入)
  328. /// </summary>
  329. [DisplayName("实验学时")]
  330. public string TrialhoursStr { get; set; }
  331. /// <summary>
  332. /// 总学时
  333. /// </summary>
  334. [Required]
  335. [DisplayName("总学时")]
  336. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  337. public int? Totalhours { get; set; }
  338. /// <summary>
  339. /// 理论周次
  340. /// </summary>
  341. [Required]
  342. [DisplayName("理论周次")]
  343. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  344. public int? TheoryWeeklyNum { get; set; }
  345. /// <summary>
  346. /// 实践周次
  347. /// </summary>
  348. [Required]
  349. [DisplayName("实践周次")]
  350. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  351. public int? PracticeWeeklyNum { get; set; }
  352. /// <summary>
  353. /// 实验周次
  354. /// </summary>
  355. [Required]
  356. [DisplayName("实验周次")]
  357. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  358. public int? TrialWeeklyNum { get; set; }
  359. /// <summary>
  360. /// 总周次
  361. /// </summary>
  362. [Required]
  363. [DisplayName("总周次")]
  364. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  365. public int? SchoolweeksNum { get; set; }
  366. /// <summary>
  367. /// 周学时
  368. /// </summary>
  369. [Required]
  370. [DisplayName("周学时")]
  371. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  372. public int? WeeklyHours { get; set; }
  373. /// <summary>
  374. /// 每周次数
  375. /// </summary>
  376. [Required]
  377. [DisplayName("每周次数")]
  378. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  379. public int? WeeklyNum { get; set; }
  380. /// <summary>
  381. /// 开始周次
  382. /// </summary>
  383. [Required]
  384. [DisplayName("开始周次")]
  385. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  386. public int? StartWeeklyNum { get; set; }
  387. /// <summary>
  388. /// 结束周次
  389. /// </summary>
  390. [Required]
  391. [DisplayName("结束周次")]
  392. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  393. public int? EndWeeklyNum { get; set; }
  394. /// <summary>
  395. /// 起止周次
  396. /// </summary>
  397. [DisplayName("起止周次")]
  398. public string StartEndWeeklyNum { get; set; }
  399. /// <summary>
  400. /// 开课教研室ID
  401. /// </summary>
  402. [Required]
  403. [DisplayName("开课教研室ID")]
  404. public Guid? DepartmentID { get; set; }
  405. /// <summary>
  406. /// 教研室代码
  407. /// </summary>
  408. [DisplayName("教研室代码")]
  409. public string DepartmentCode { get; set; }
  410. /// <summary>
  411. /// 开课教研室
  412. /// </summary>
  413. [DisplayName("开课教研室")]
  414. public string DepartmentName { get; set; }
  415. /// <summary>
  416. /// 开课院系ID
  417. /// </summary>
  418. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CourseCollege")]
  419. public Guid? CollegeID { get; set; }
  420. /// <summary>
  421. /// 开课院系代码
  422. /// </summary>
  423. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CourseCollege")]
  424. public string CollegeCode { get; set; }
  425. /// <summary>
  426. /// 开课院系
  427. /// </summary>
  428. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CourseCollege")]
  429. public string CollegeName { get; set; }
  430. /// <summary>
  431. /// 院系专业ID(SOC)
  432. /// </summary>
  433. [DisplayName("院系专业ID")]
  434. public Guid? FacultymajorID { get; set; }
  435. /// <summary>
  436. /// 是否专业核心
  437. /// </summary>
  438. [DisplayName("是否专业核心")]
  439. public bool IsSpecialtycore { get; set; }
  440. /// <summary>
  441. /// 是否专业核心(Excel导入用)
  442. /// </summary>
  443. [DisplayName("是否专业核心")]
  444. public string IsSpecialtycoreStr { get; set; }
  445. /// <summary>
  446. /// 是否专业核心
  447. /// </summary>
  448. [DisplayName("是否专业核心")]
  449. public string IsSpecialtycoreName
  450. {
  451. get { return this.IsSpecialtycore != true ? "否" : "是"; }
  452. }
  453. /// <summary>
  454. /// 是否合作开发
  455. /// </summary>
  456. [DisplayName("是否合作开发")]
  457. public bool IsCooperation { get; set; }
  458. /// <summary>
  459. /// 是否合作开发(Excel导入用)
  460. /// </summary>
  461. [DisplayName("是否合作开发")]
  462. public string IsCooperationStr { get; set; }
  463. /// <summary>
  464. /// 是否合作开发
  465. /// </summary>
  466. [DisplayName("是否合作开发")]
  467. public string IsCooperationName
  468. {
  469. get { return this.IsCooperation != true ? "否" : "是"; }
  470. }
  471. /// <summary>
  472. /// 是否必修课
  473. /// </summary>
  474. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "IsRequired")]
  475. public bool IsRequired { get; set; }
  476. /// <summary>
  477. /// 是否必修课(Excel导入用)
  478. /// </summary>
  479. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "IsRequired")]
  480. public string IsRequiredStr { get; set; }
  481. /// <summary>
  482. /// 是否必修课
  483. /// </summary>
  484. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "IsRequired")]
  485. public string IsRequiredName
  486. {
  487. get { return this.IsRequired != true ? "否" : "是"; }
  488. }
  489. /// <summary>
  490. /// 是否网上选修
  491. /// </summary>
  492. [DisplayName("是否网上选修")]
  493. public bool IsElective { get; set; }
  494. /// <summary>
  495. /// 是否网上选修(Excel导入用)
  496. /// </summary>
  497. [DisplayName("是否网上选修")]
  498. public string IsElectiveStr { get; set; }
  499. /// <summary>
  500. /// 是否网上选修
  501. /// </summary>
  502. [DisplayName("是否网上选修")]
  503. public string IsElectiveName
  504. {
  505. get { return this.IsElective != true ? "否" : "是"; }
  506. }
  507. /// <summary>
  508. /// 是否网络课程
  509. /// </summary>
  510. [DisplayName("是否网络课程")]
  511. public bool IsNetworkCourse { get; set; }
  512. /// <summary>
  513. /// 是否网络课程(Excel导入用)
  514. /// </summary>
  515. [DisplayName("是否网络课程")]
  516. public string IsNetworkCourseStr { get; set; }
  517. /// <summary>
  518. /// 是否网络课程
  519. /// </summary>
  520. [DisplayName("是否网络课程")]
  521. public string IsNetworkCourseName
  522. {
  523. get { return this.IsNetworkCourse != true ? "否" : "是"; }
  524. }
  525. /// <summary>
  526. /// 是否学位课程
  527. /// </summary>
  528. [DisplayName("是否学位课程")]
  529. public bool IsMainCourse { get; set; }
  530. /// <summary>
  531. /// 是否学位课程(Excel导入用)
  532. /// </summary>
  533. [DisplayName("是否学位课程")]
  534. public string IsMainCourseStr { get; set; }
  535. /// <summary>
  536. /// 是否学位课程
  537. /// </summary>
  538. [DisplayName("是否学位课程")]
  539. public string IsMainCourseName
  540. {
  541. get { return this.IsMainCourse != true ? "否" : "是"; }
  542. }
  543. /// <summary>
  544. /// 是否需要教材
  545. /// </summary>
  546. [DisplayName("是否需要教材")]
  547. public bool IsNeedMaterial { get; set; }
  548. /// <summary>
  549. /// 是否需要教材(Excel导入用)
  550. /// </summary>
  551. [DisplayName("是否需要教材")]
  552. public string IsNeedMaterialStr { get; set; }
  553. /// <summary>
  554. /// 是否需要教材
  555. /// </summary>
  556. [DisplayName("是否需要教材")]
  557. public string IsNeedMaterialName
  558. {
  559. get { return this.IsNeedMaterial != true ? "否" : "是"; }
  560. }
  561. /// <summary>
  562. /// 精品课程
  563. /// </summary>
  564. [DisplayName("精品课程")]
  565. public int? CourseFineID { get; set; }
  566. /// <summary>
  567. /// 精品课程(Excel导入用)
  568. /// </summary>
  569. [DisplayName("精品课程")]
  570. public string CourseFineStr { get; set; }
  571. /// <summary>
  572. /// 精品课程
  573. /// </summary>
  574. [DisplayName("精品课程")]
  575. public string CourseFineName
  576. {
  577. get
  578. {
  579. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseFine.ToString())
  580. .Where(x => x.Value == CourseFineID)
  581. .Select(x => x.Name).FirstOrDefault();
  582. }
  583. }
  584. /// <summary>
  585. /// 实践类型
  586. /// </summary>
  587. [DisplayName("实践类型")]
  588. public int? PracticeTypeID { get; set; }
  589. /// <summary>
  590. /// 实践类型(Excel导入用)
  591. /// </summary>
  592. [DisplayName("实践类型")]
  593. public string PracticeTypeStr { get; set; }
  594. /// <summary>
  595. /// 实践类型
  596. /// </summary>
  597. [DisplayName("实践类型")]
  598. public string PracticeTypeName
  599. {
  600. get
  601. {
  602. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_PracticeType.ToString())
  603. .Where(x => x.Value == PracticeTypeID)
  604. .Select(x => x.Name).FirstOrDefault();
  605. }
  606. }
  607. /// <summary>
  608. /// 授课语言
  609. /// </summary>
  610. [DisplayName("授课语言")]
  611. public int? TeachinglanguageID { get; set; }
  612. /// <summary>
  613. /// 授课语言(Excel导入用)
  614. /// </summary>
  615. [DisplayName("授课语言")]
  616. public string TeachinglanguageStr { get; set; }
  617. /// <summary>
  618. /// 授课语言
  619. /// </summary>
  620. [DisplayName("授课语言")]
  621. public string TeachinglanguageName
  622. {
  623. get
  624. {
  625. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Teachinglanguage.ToString())
  626. .Where(x => x.Value == TeachinglanguageID)
  627. .Select(x => x.Name).FirstOrDefault();
  628. }
  629. }
  630. /// <summary>
  631. /// 考试方式
  632. /// </summary>
  633. [Required]
  634. [DisplayName("考试方式")]
  635. public int? ExaminationModeID { get; set; }
  636. /// <summary>
  637. /// 考试方式(Excel导入用)
  638. /// </summary>
  639. [DisplayName("考试方式")]
  640. public string ExaminationModeStr { get; set; }
  641. /// <summary>
  642. /// 考试方式
  643. /// </summary>
  644. [DisplayName("考试方式")]
  645. public string ExaminationModeName
  646. {
  647. get
  648. {
  649. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString())
  650. .Where(x => x.Value == ExaminationModeID)
  651. .Select(x => x.Name).FirstOrDefault();
  652. }
  653. }
  654. /// <summary>
  655. /// 成绩类型
  656. /// </summary>
  657. [Required]
  658. [DisplayName("成绩类型")]
  659. public int? ResultTypeID { get; set; }
  660. /// <summary>
  661. /// 成绩类型(Excel导入用)
  662. /// </summary>
  663. [DisplayName("成绩类型")]
  664. public string ResultTypeStr { get; set; }
  665. /// <summary>
  666. /// 成绩类型
  667. /// </summary>
  668. [DisplayName("成绩类型")]
  669. public string ResultTypeName
  670. {
  671. get
  672. {
  673. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ResultType.ToString())
  674. .Where(x => x.Value == ResultTypeID)
  675. .Select(x => x.Name).FirstOrDefault();
  676. }
  677. }
  678. /// <summary>
  679. /// 处理方式
  680. /// </summary>
  681. [Required]
  682. [DisplayName("处理方式")]
  683. public int? HandleModeID { get; set; }
  684. /// <summary>
  685. /// 处理方式(Excel导入用)
  686. /// </summary>
  687. [DisplayName("处理方式")]
  688. public string HandleModeStr { get; set; }
  689. /// <summary>
  690. /// 处理方式
  691. /// </summary>
  692. [DisplayName("处理方式")]
  693. public string HandleModeName
  694. {
  695. get
  696. {
  697. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HandleMode.ToString())
  698. .Where(x => x.Value == HandleModeID)
  699. .Select(x => x.Name).FirstOrDefault();
  700. }
  701. }
  702. /// <summary>
  703. /// 授课方式
  704. /// </summary>
  705. [DisplayName("授课方式")]
  706. public List<int?> TeachingModeIDList { get; set; }
  707. /// <summary>
  708. /// 授课方式List(Excel导入用,可存在多个授课方式--用顿号隔开)
  709. /// </summary>
  710. [DisplayName("授课方式")]
  711. public string TeachingModeIDListStr { get; set; }
  712. /// <summary>
  713. /// 授课方式(可存在多个授课方式--用顿号隔开)
  714. /// </summary>
  715. [DisplayName("授课方式")]
  716. public string TeachingModeIDListName
  717. {
  718. get
  719. {
  720. if (TeachingModeIDList != null && TeachingModeIDList.Count() > 0)
  721. {
  722. return string.Join("、", TeachingModeIDList.Select(x =>
  723. IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString())
  724. .Where(w => w.Value == x).Select(w => w.Name).FirstOrDefault()));
  725. }
  726. else
  727. {
  728. return "";
  729. }
  730. }
  731. }
  732. /// <summary>
  733. /// 授课地点
  734. /// </summary>
  735. [DisplayName("授课地点")]
  736. public List<int?> TeachingPlaceIDList { get; set; }
  737. /// <summary>
  738. /// 授课地点List(Excel导入用,可存在多个授课地点--用顿号隔开)
  739. /// </summary>
  740. [DisplayName("授课地点")]
  741. public string TeachingPlaceIDListStr { get; set; }
  742. /// <summary>
  743. /// 授课地点(可存在多个授课地点--用顿号隔开)
  744. /// </summary>
  745. [DisplayName("授课地点")]
  746. public string TeachingPlaceIDListName
  747. {
  748. get
  749. {
  750. if (TeachingPlaceIDList != null && TeachingPlaceIDList.Count() > 0)
  751. {
  752. return string.Join("、", TeachingPlaceIDList.Select(x =>
  753. IdNameExt.GetDictionaryItem(DictionaryItem.EM_TeachingPlace.ToString())
  754. .Where(w => w.Value == x).Select(w => w.Name).FirstOrDefault()));
  755. }
  756. else
  757. {
  758. return "";
  759. }
  760. }
  761. }
  762. /// <summary>
  763. /// 是否启用
  764. /// </summary>
  765. [DisplayName("是否启用")]
  766. public bool IsEnable { get; set; }
  767. /// <summary>
  768. /// 是否启用
  769. /// </summary>
  770. [DisplayName("是否启用")]
  771. public string IsEnableName
  772. {
  773. get { return this.IsEnable != true ? "否" : "是"; }
  774. }
  775. /// <summary>
  776. /// 备注
  777. /// </summary>
  778. [DisplayName("备注")]
  779. public string Remark { get; set; }
  780. /// <summary>
  781. /// 错误信息(Excel导入)
  782. /// </summary>
  783. [DisplayName("未导入原因")]
  784. public string ErrorMessage { get; set; }
  785. /// <summary>
  786. /// 状态
  787. /// </summary>
  788. [DisplayName("状态")]
  789. public int? RecordStatus { get; set; }
  790. /// <summary>
  791. /// 创建人
  792. /// </summary>
  793. [DisplayName("创建人")]
  794. public Guid? CreateUserID { get; set; }
  795. /// <summary>
  796. /// 创建时间
  797. /// </summary>
  798. [DisplayName("创建时间")]
  799. public DateTime? CreateTime { get; set; }
  800. /// <summary>
  801. /// 修改人
  802. /// </summary>
  803. [DisplayName("修改人")]
  804. public Guid? ModifyUserID { get; set; }
  805. /// <summary>
  806. /// 修改时间
  807. /// </summary>
  808. [DisplayName("修改时间")]
  809. public DateTime? ModifyTime { get; set; }
  810. }
  811. }