SelectCourseListView.cs 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112
  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.SelectCourse.SelectCourseResult
  9. {
  10. public class SelectCourseListView
  11. {
  12. //////学生相关信息
  13. /// <summary>
  14. /// 用户ID
  15. /// </summary>
  16. [DisplayName("用户ID")]
  17. public Guid UserID { get; set; }
  18. /// <summary>
  19. /// 学号
  20. /// </summary>
  21. [Required]
  22. [DisplayName("学号")]
  23. public string LoginID { get; set; }
  24. /// <summary>
  25. /// 姓名
  26. /// </summary>
  27. [Required]
  28. [DisplayName("姓名")]
  29. public string UserName { get; set; }
  30. /// <summary>
  31. /// 性别
  32. /// </summary>
  33. [Required]
  34. [DisplayName("性别")]
  35. public int? Sex { get; set; }
  36. /// <summary>
  37. /// 性别名称
  38. /// </summary>
  39. [DisplayName("性别")]
  40. public string SexName
  41. {
  42. get
  43. {
  44. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Sex.ToString())
  45. .Where(x => x.Value == Sex)
  46. .Select(x => x.Name).FirstOrDefault();
  47. }
  48. }
  49. /// <summary>
  50. /// 证件类型
  51. /// </summary>
  52. [Required]
  53. [DisplayName("证件类型")]
  54. public int? CertificatesType { get; set; }
  55. /// <summary>
  56. /// 证件号码
  57. /// </summary>
  58. [Required]
  59. [DisplayName("证件号码")]
  60. public string IDNumber { get; set; }
  61. /// <summary>
  62. /// 班级名称
  63. /// </summary>
  64. [Required]
  65. [DisplayName("班级名称")]
  66. public Guid? ClassMajorID { get; set; }
  67. /// <summary>
  68. /// 班级编号
  69. /// </summary>
  70. [DisplayName("班级编号")]
  71. public string ClassMajorCode { get; set; }
  72. /// <summary>
  73. /// 班级名称
  74. /// </summary>
  75. [DisplayName("班级名称")]
  76. public string ClassMajorName { get; set; }
  77. /// <summary>
  78. /// 照片
  79. /// </summary>
  80. [DisplayName("照片")]
  81. public string PhotoUrl { get; set; }
  82. /// <summary>
  83. /// 学籍状态
  84. /// </summary>
  85. [Required]
  86. [DisplayName("学籍状态")]
  87. public int? StudentStatus { get; set; }
  88. /// <summary>
  89. /// 学籍状态名称
  90. /// </summary>
  91. [DisplayName("学籍状态")]
  92. public string StudentStatusName
  93. {
  94. get
  95. {
  96. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StudentStatus.ToString())
  97. .Where(x => x.Value == StudentStatus).Select(x => x.Name).FirstOrDefault();
  98. }
  99. }
  100. /// <summary>
  101. /// 学生类别
  102. /// </summary>
  103. [Required]
  104. [DisplayName("学生类别")]
  105. public int? StudentType { get; set; }
  106. /// <summary>
  107. /// 学生类别名称
  108. /// </summary>
  109. [DisplayName("学生类别名称")]
  110. public string StudentTypeName
  111. {
  112. get
  113. {
  114. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_STUDENTTYPE.ToString())
  115. .Where(x => x.Value == StudentType)
  116. .Select(x => x.Name).FirstOrDefault();
  117. }
  118. }
  119. /// <summary>
  120. /// 学籍卡编号
  121. /// </summary>
  122. [DisplayName("学籍卡编号")]
  123. public string StudentCardNo { get; set; }
  124. /// <summary>
  125. /// 培养方式
  126. /// </summary>
  127. [DisplayName("培养方式")]
  128. public int? CultureModel { get; set; }
  129. /// <summary>
  130. /// 培养方式
  131. /// </summary>
  132. [DisplayName("培养方式名称")]
  133. public string CultureModelName
  134. {
  135. get
  136. {
  137. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CULTUREMODEL.ToString())
  138. .Where(x => x.Value == CultureModel)
  139. .Select(x => x.Name).FirstOrDefault();
  140. }
  141. }
  142. /// <summary>
  143. /// 在校状态
  144. /// </summary>
  145. [DisplayName("在校状态")]
  146. [Required]
  147. public int? InSchoolStatusID { get; set; }
  148. /// <summary>
  149. /// 在校状态名称
  150. /// </summary>
  151. [DisplayName("在校状态")]
  152. public string InSchoolStatusName
  153. {
  154. get
  155. {
  156. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_InschoolStatus.ToString())
  157. .Where(x => x.Value == InSchoolStatusID)
  158. .Select(x => x.Name).FirstOrDefault();
  159. }
  160. }
  161. /// <summary>
  162. /// 报到状态
  163. /// </summary>
  164. [DisplayName("报到状态")]
  165. public int? ReportStatusID { get; set; }
  166. /// <summary>
  167. /// 报到状态Name
  168. /// </summary>
  169. [DisplayName("报到状态")]
  170. public string ReportStatusName
  171. {
  172. get
  173. {
  174. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ReportStatus.ToString())
  175. .Where(x => x.Value == ReportStatusID)
  176. .Select(x => x.Name).FirstOrDefault();
  177. }
  178. }
  179. /// <summary>
  180. /// 出生日期
  181. /// </summary>
  182. [DisplayName("出生日期")]
  183. [DataType(DataType.Date)]
  184. [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}")]
  185. public DateTime? BirthDate { get; set; }
  186. /// <summary>
  187. /// 国籍
  188. /// </summary>
  189. [DisplayName("国籍")]
  190. public string Country { get; set; }
  191. /// <summary>
  192. /// 政治面貌
  193. /// </summary>
  194. [DisplayName("政治面貌")]
  195. public int? Politics { get; set; }
  196. //<summary>
  197. //政治面貌
  198. //</summary>
  199. [DisplayName("政治面貌")]
  200. public string PoliticsName
  201. {
  202. get
  203. {
  204. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Politics.ToString())
  205. .Where(x => x.Value == Politics)
  206. .Select(x => x.Name).FirstOrDefault();
  207. }
  208. }
  209. /// <summary>
  210. /// 民族
  211. /// </summary>
  212. [DisplayName("民族")]
  213. public int? Nation { get; set; }
  214. /// <summary>
  215. /// 考生号
  216. /// </summary>
  217. [DisplayName("考生号")]
  218. public string ExamineeNum { get; set; }
  219. /// <summary>
  220. /// 考生类别
  221. /// </summary>
  222. [DisplayName("考生类别")]
  223. public int? ExamineeType { get; set; }
  224. /// <summary>
  225. /// 入学日期
  226. /// </summary>
  227. [DisplayName("入学日期")]
  228. [DataType(DataType.Date)]
  229. [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}")]
  230. public DateTime? EntranceDate { get; set; }
  231. /// <summary>
  232. /// 入学学期
  233. /// </summary>
  234. [Required]
  235. [DisplayName("入学学期")]
  236. public Guid? EnteringSchoolYearID { get; set; }
  237. /// <summary>
  238. /// 入学学期
  239. /// </summary>
  240. [DisplayName("入学学期")]
  241. public string EnteringSchoolYearCode { get; set; }
  242. /// <summary>
  243. /// 入学方式
  244. /// </summary>
  245. [DisplayName("入学方式")]
  246. public int? EntranceWay { get; set; }
  247. /// <summary>
  248. /// 生源所属地
  249. /// </summary>
  250. [DisplayName("生源所属地")]
  251. public int? Territorial { get; set; }
  252. /// <summary>
  253. /// 生源所属地名称
  254. /// </summary>
  255. [DisplayName("生源所属地名称")]
  256. public string TerritorialName
  257. {
  258. get
  259. {
  260. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Province.ToString())
  261. .Where(x => x.Value == Territorial)
  262. .Select(x => x.Name).FirstOrDefault();
  263. }
  264. }
  265. /// <summary>
  266. /// 来源地区
  267. /// </summary>
  268. [DisplayName("来源地区")]
  269. public string Area { get; set; }
  270. /// <summary>
  271. /// 高考总分
  272. /// </summary>
  273. [DisplayName("高考总分")]
  274. public decimal? Score { get; set; }
  275. /// <summary>
  276. /// 考生特征
  277. /// </summary>
  278. [DisplayName("考生特征")]
  279. public int? Features { get; set; }
  280. /// <summary>
  281. /// 年级
  282. /// </summary>
  283. [DisplayName("年级")]
  284. public int? Grade { get; set; }
  285. /// <summary>
  286. /// 年级
  287. /// </summary>
  288. [DisplayName("年级")]
  289. public int? Years { get; set; }
  290. /// <summary>
  291. /// 出生地
  292. /// </summary>
  293. [DisplayName("出生地")]
  294. public string Placebirth { get; set; }
  295. /// <summary>
  296. /// 民族姓名
  297. /// </summary>
  298. [DisplayName("民族")]
  299. public string NationName
  300. {
  301. get
  302. {
  303. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Nation.ToString())
  304. .Where(x => x.Value == Nation)
  305. .Select(x => x.Name).FirstOrDefault();
  306. }
  307. }
  308. /// <summary>
  309. /// 校区ID
  310. /// </summary>
  311. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")]
  312. public Guid? CampusID { get; set; }
  313. /// <summary>
  314. /// 校区ID
  315. /// </summary>
  316. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
  317. public string CampusName { get; set; }
  318. /// <summary>
  319. /// 培养层次
  320. /// </summary>
  321. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  322. public int? EducationID { get; set; }
  323. /// <summary>
  324. /// 学制
  325. /// </summary>
  326. [DisplayName("学制")]
  327. public decimal? LearnSystem { get; set; }
  328. /// <summary>
  329. /// 培养方案
  330. /// </summary>
  331. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  332. public string EducationName
  333. {
  334. get
  335. {
  336. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  337. .Where(x => x.Value == EducationID)
  338. .Select(x => x.Name).FirstOrDefault();
  339. }
  340. }
  341. /// <summary>
  342. /// 标准专业
  343. /// </summary>
  344. [DisplayName("标准专业")]
  345. public int? StandardID { get; set; }
  346. /// <summary>
  347. /// 专业代码
  348. /// </summary>
  349. [DisplayName("专业代码")]
  350. public string StandardCode
  351. {
  352. get
  353. {
  354. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  355. .Where(x => x.Value == StandardID)
  356. .Select(x => x.Code).FirstOrDefault();
  357. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  358. }
  359. }
  360. /// <summary>
  361. /// 标准专业名称
  362. /// </summary>
  363. [DisplayName("专业名称")]
  364. public string StandardName
  365. {
  366. get
  367. {
  368. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  369. .Where(x => x.Value == StandardID)
  370. .Select(x => x.Name).FirstOrDefault();
  371. }
  372. }
  373. /// <summary>
  374. /// 学习形式
  375. /// </summary>
  376. [DisplayName("学习形式")]
  377. public int? LearningformID { get; set; }
  378. /// <summary>
  379. /// 标准专业名称
  380. /// </summary>
  381. [DisplayName("学习形式")]
  382. public string LearningformName
  383. {
  384. get
  385. {
  386. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  387. .Where(x => x.Value == LearningformID)
  388. .Select(x => x.Name).FirstOrDefault();
  389. }
  390. }
  391. /// <summary>
  392. /// 证件名称
  393. /// </summary>
  394. [DisplayName("证件名称")]
  395. public string CertificatesTypeName
  396. {
  397. get
  398. {
  399. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CertificatesType.ToString())
  400. .Where(x => x.Value == CertificatesType)
  401. .Select(x => x.Name).FirstOrDefault();
  402. }
  403. }
  404. /// <summary>
  405. /// 考生类别
  406. /// </summary>
  407. [DisplayName("考生类别")]
  408. public string ExamineeTypeName
  409. {
  410. get
  411. {
  412. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_EXAMINEETYPE.ToString())
  413. .Where(x => x.Value == ExamineeType)
  414. .Select(x => x.Name).FirstOrDefault();
  415. }
  416. }
  417. /// <summary>
  418. /// 入学方式
  419. /// </summary>
  420. [DisplayName("入学方式")]
  421. public string EntranceWayName
  422. {
  423. get
  424. {
  425. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_EntranceWay.ToString())
  426. .Where(x => x.Value == EntranceWay)
  427. .Select(x => x.Name).FirstOrDefault();
  428. }
  429. }
  430. /// <summary>
  431. /// 考生特征
  432. /// </summary>
  433. [DisplayName("考生特征")]
  434. public string FeaturesName
  435. {
  436. get
  437. {
  438. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Features.ToString())
  439. .Where(x => x.Value == Features)
  440. .Select(x => x.Name).FirstOrDefault();
  441. }
  442. }
  443. /// <summary>
  444. /// 年级专业ID
  445. /// </summary>
  446. public Guid? GradeMajorID { get; set; }
  447. /// <summary>
  448. /// 年级专业代码
  449. /// </summary>
  450. [DisplayName("专业代码")]
  451. public string GradeMajorCode { get; set; }
  452. /// <summary>
  453. /// 年级专业名称
  454. /// </summary>
  455. [DisplayName("年级专业名称")]
  456. public string GradeMajorName { get; set; }
  457. /// <summary>
  458. /// 院系所专业
  459. /// </summary>
  460. [DisplayName("院系所专业")]
  461. public string FacultymajorName { get; set; }
  462. //下面选课结果信息
  463. ////////////////////////////////////////////
  464. /// <summary>
  465. /// ID
  466. /// </summary>
  467. [DisplayName("选修类型")]
  468. public Guid ID { get; set; }
  469. /// <summary>
  470. /// 选课编号
  471. /// </summary>
  472. [DisplayName("选课编号")]
  473. public string SelectionCouseNo { get; set; }
  474. /// <summary>
  475. /// 选修任务班名称
  476. /// </summary>
  477. [DisplayName("选修任务班名称")]
  478. public string DefaultClassName { get; set; }
  479. /// <summary>
  480. /// 学年学期ID
  481. /// </summary>
  482. [DisplayName("学年学期ID")]
  483. public Guid? SchoolyearID { get; set; }
  484. /// <summary>
  485. /// 学年学期
  486. /// </summary>
  487. [DisplayName("学年学期")]
  488. public string SchoolYearCode { get; set; }
  489. /// <summary>
  490. /// 学年(学年学期对应学年)
  491. /// </summary>
  492. [DisplayName("学年")]
  493. public int? YearID { get; set; }
  494. /// <summary>
  495. /// 选修类型
  496. /// </summary>
  497. [DisplayName("选修类型")]
  498. public int SelectCourseType { get; set; }
  499. /// <summary>
  500. /// 选修类型
  501. /// </summary>
  502. [DisplayName("选修类型")]
  503. public string SelectCourseTypeName
  504. {
  505. get
  506. {
  507. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_SelectCourseType.ToString())
  508. .Where(x => x.Value == SelectCourseType)
  509. .Select(x => x.Name).FirstOrDefault();
  510. }
  511. }
  512. /// <summary>
  513. /// 开课教研室
  514. /// </summary>
  515. [DisplayName("开课教研室")]
  516. [Required]
  517. public Guid? DepartmentID { get; set; }
  518. /// <summary>
  519. /// 开课教研室编号
  520. /// </summary>
  521. [DisplayName("开课教研室编号")]
  522. public string DepartmentCode { get; set; }
  523. /// <summary>
  524. /// 开课教研室
  525. /// </summary>
  526. [DisplayName("开课教研室")]
  527. public string DepartmentName { get; set; }
  528. /// <summary>
  529. /// 开课院系所
  530. /// </summary>
  531. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  532. public Guid? CollegeID { get; set; }
  533. /// <summary>
  534. /// 开课院系所
  535. /// </summary>
  536. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  537. public string CollegeName { get; set; }
  538. /// <summary>
  539. /// 课程信息ID
  540. /// </summary>
  541. public Guid? CoursematerialID { get; set; }
  542. /// <summary>
  543. /// 课程代码
  544. /// </summary>
  545. [DisplayName("课程代码")]
  546. public string CourseCode { get; set; }
  547. /// <summary>
  548. /// 课程名称
  549. /// </summary>
  550. [DisplayName("课程名称")]
  551. public string CourseName { get; set; }
  552. /// <summary>
  553. /// 课程类型
  554. /// </summary>
  555. [DisplayName("课程类型")]
  556. public int? CourseTypeID { get; set; }
  557. /// <summary>
  558. /// 课程类型
  559. /// </summary>
  560. [DisplayName("课程类型")]
  561. public string CourseTypeName
  562. {
  563. get
  564. {
  565. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseType.ToString())
  566. .Where(x => x.Value == CourseTypeID)
  567. .Select(x => x.Name).FirstOrDefault();
  568. }
  569. }
  570. /// <summary>
  571. /// 课程结构
  572. /// </summary>
  573. //[Required]
  574. [DisplayName("课程结构")]
  575. public int? CourseStructureID { get; set; }
  576. /// <summary>
  577. /// 课程结构
  578. /// </summary>
  579. [DisplayName("课程结构")]
  580. public string CourseStructureName
  581. {
  582. get
  583. {
  584. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseStructure.ToString())
  585. .Where(x => x.Value == CourseStructureID)
  586. .Select(x => x.Name).FirstOrDefault();
  587. }
  588. }
  589. /// <summary>
  590. /// 课程属性
  591. /// </summary>
  592. //[Required]
  593. [DisplayName("课程属性")]
  594. public int? CourseCategoryID { get; set; }
  595. /// <summary>
  596. /// 课程属性
  597. /// </summary>
  598. [DisplayName("课程属性")]
  599. public string CourseCategoryName
  600. {
  601. get
  602. {
  603. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseCategory.ToString())
  604. .Where(x => x.Value == CourseCategoryID)
  605. .Select(x => x.Name).FirstOrDefault();
  606. }
  607. }
  608. /// <summary>
  609. /// 课程性质
  610. /// </summary>
  611. [DisplayName("课程性质")]
  612. public int? CourseQualityID { get; set; }
  613. /// <summary>
  614. /// 课程性质
  615. /// </summary>
  616. [DisplayName("课程性质")]
  617. public string CourseQualityName
  618. {
  619. get
  620. {
  621. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseQuality.ToString())
  622. .Where(x => x.Value == CourseQualityID)
  623. .Select(x => x.Name).FirstOrDefault();
  624. }
  625. }
  626. /// <summary>
  627. /// 学分
  628. /// </summary>
  629. [DisplayName("学分")]
  630. public decimal? Credit { get; set; }
  631. /// <summary>
  632. /// 理论学时
  633. /// </summary>
  634. [DisplayName("理论学时")]
  635. public int? TheoryCourse { get; set; }
  636. /// <summary>
  637. /// 实践学时
  638. /// </summary>
  639. [DisplayName("实践学时")]
  640. public int? Practicehours { get; set; }
  641. /// <summary>
  642. /// 实验学时
  643. /// </summary>
  644. [DisplayName("实验学时")]
  645. public int? Trialhours { get; set; }
  646. /// <summary>
  647. /// 总学时
  648. /// </summary>
  649. [DisplayName("总学时")]
  650. public int? Totalhours
  651. {
  652. get
  653. {
  654. if (TheoryCourse == null)
  655. TheoryCourse = 0;
  656. if (Practicehours == null)
  657. Practicehours = 0;
  658. return (TheoryCourse + Practicehours);
  659. //return this.TheoryCourse ?? 0 + this.Practicehours ?? 0 + this.Trialhours ?? 0; }
  660. }
  661. }
  662. /// <summary>
  663. /// 上课周数
  664. /// </summary>
  665. [DisplayName("上课周数")]
  666. public int? SchoolweeksNum
  667. {
  668. get
  669. {
  670. return (TheoryWeeklyNum ?? 0) + (PracticeWeeklyNum ?? 0) + (TrialWeeklyNum ?? 0);
  671. }
  672. }
  673. /// <summary>
  674. /// 每周次数
  675. /// </summary>
  676. [DisplayName("每周次数")]
  677. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  678. public int? WeeklyNum { get; set; }
  679. /// <summary>
  680. /// 理论周次
  681. /// </summary>
  682. [DisplayName("理论周次")]
  683. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  684. public int? TheoryWeeklyNum { get; set; }
  685. /// <summary>
  686. /// 实践周次
  687. /// </summary>
  688. [DisplayName("实践周次")]
  689. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  690. public int? PracticeWeeklyNum { get; set; }
  691. /// <summary>
  692. /// 实验周次
  693. /// </summary>
  694. [DisplayName("实验周次")]
  695. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  696. public int? TrialWeeklyNum { get; set; }
  697. /// <summary>
  698. /// 周学时
  699. /// </summary>
  700. [DisplayName("周学时")]
  701. [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入数字")]//^[1-9]\d*|0$
  702. public int? WeeklyHours { get; set; }
  703. /// <summary>
  704. /// 开始周次
  705. /// </summary>
  706. [DisplayName("开始周次")]
  707. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  708. public int? StartWeeklyNum { get; set; }
  709. /// <summary>
  710. /// 结束周次
  711. /// </summary>
  712. [DisplayName("结束周次")]
  713. //[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  714. public int? EndWeeklyNum { get; set; }
  715. /// <summary>
  716. /// 起止周次
  717. /// </summary>
  718. [DisplayName("起止周次")]
  719. public string StartEndWeeklyNum
  720. {
  721. get
  722. {
  723. if (StartWeeklyNum != null && EndWeeklyNum != null)
  724. return StartWeeklyNum + "-" + EndWeeklyNum;
  725. else
  726. return "";
  727. }
  728. }
  729. /// <summary>
  730. /// 授课方式
  731. /// </summary>
  732. [DisplayName("授课方式")]
  733. public int? TeachingModeID { get; set; }
  734. /// <summary>
  735. /// 授课方式
  736. /// </summary>
  737. [DisplayName("授课方式")]
  738. public string TeachingModeName
  739. {
  740. get
  741. {
  742. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString())
  743. .Where(x => x.Value == TeachingModeID)
  744. .Select(x => x.Name).FirstOrDefault();
  745. }
  746. }
  747. /// <summary>
  748. /// 实践类型
  749. /// </summary>
  750. [DisplayName("实践类型")]
  751. public int? PracticeTypeID { get; set; }
  752. // <summary>
  753. /// 实践类型
  754. /// </summary>
  755. [DisplayName("实践类型")]
  756. public string PracticeTypeNameStr { get; set; }
  757. /// <summary>
  758. /// 实践类型
  759. /// </summary>
  760. [DisplayName("实践类型")]
  761. public string PracticeTypeName
  762. {
  763. get
  764. {
  765. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_PracticeType.ToString())
  766. .Where(x => x.Value == PracticeTypeID)
  767. .Select(x => x.Name).FirstOrDefault();
  768. }
  769. }
  770. /// <summary>
  771. /// 考试方式
  772. /// </summary>
  773. [DisplayName("考试方式")]
  774. public int? ExaminationModeID { get; set; }
  775. /// <summary>
  776. /// 考试方式
  777. /// </summary>
  778. [DisplayName("考试方式")]
  779. public string ExaminationModeName
  780. {
  781. get
  782. {
  783. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString())
  784. .Where(x => x.Value == CourseTypeID)
  785. .Select(x => x.Name).FirstOrDefault();
  786. }
  787. }
  788. /// <summary>
  789. /// 授课语言
  790. /// </summary>
  791. [DisplayName("授课语言")]
  792. public int? TeachinglanguageID { get; set; }
  793. /// <summary>
  794. /// 授课语言
  795. /// </summary>
  796. [DisplayName("授课语言")]
  797. public string TeachinglanguageName
  798. {
  799. get
  800. {
  801. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Teachinglanguage.ToString())
  802. .Where(x => x.Value == TeachinglanguageID)
  803. .Select(x => x.Name).FirstOrDefault();
  804. }
  805. }
  806. /// <summary>
  807. /// 开课学年
  808. /// </summary>
  809. [DisplayName("开课学年")]
  810. public int? SchoolyearNumID { get; set; }
  811. /// <summary>
  812. /// 开课学年
  813. /// </summary>
  814. [DisplayName("开课学年")]
  815. public string SchoolyearNumName { get; set; }
  816. /// <summary>
  817. /// 学期
  818. /// </summary>
  819. [DisplayName("学期")]
  820. public int? SchoolcodeID { get; set; }
  821. /// <summary>
  822. /// 学期
  823. /// </summary>
  824. [DisplayName("学期")]
  825. public string SchoolcodeName { get; set; }
  826. /// <summary>
  827. /// 开课学期
  828. /// </summary>
  829. [DisplayName("开课学期")]
  830. public int? StarttermID { get; set; }
  831. /// <summary>
  832. /// 开课学期
  833. /// </summary>
  834. [DisplayName("开课学期")]
  835. public string StarttermName { get; set; }
  836. /// <summary>
  837. /// 处理方式
  838. /// </summary>
  839. [DisplayName("处理方式")]
  840. public int? HandleModeID { get; set; }
  841. /// <summary>
  842. /// 处理方式
  843. /// </summary>
  844. [DisplayName("处理方式")]
  845. public string HandleModeName
  846. {
  847. get
  848. {
  849. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HandleMode.ToString())
  850. .Where(x => x.Value == HandleModeID)
  851. .Select(x => x.Name).FirstOrDefault();
  852. }
  853. }
  854. /// <summary>
  855. /// 是否需要教材
  856. /// </summary>
  857. [DisplayName("是否需要教材")]
  858. public bool IsNeedMaterial { get; set; }
  859. /// <summary>
  860. /// 是否需要教材
  861. /// </summary>
  862. [DisplayName("是否需要教材")]
  863. public string IsNeedMaterialName { get; set; }
  864. /// <summary>
  865. /// 人数下限
  866. /// </summary>
  867. [DisplayName("人数下限")]
  868. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  869. public int? PeopleNumlower { get; set; }
  870. /// <summary>
  871. /// 人数上限
  872. /// </summary>
  873. [DisplayName("人数上限")]
  874. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  875. public int? PeopleNumlimit { get; set; }
  876. /// <summary>
  877. /// 排课明细
  878. /// </summary>
  879. [DisplayName("排课明细")]
  880. public string Scheduling { get; set; }
  881. /// <summary>
  882. /// 星期
  883. /// </summary>
  884. [DisplayName("星期")]
  885. public int? Weekday { get; set; }
  886. /// <summary>
  887. /// 星期
  888. /// </summary>
  889. [DisplayName("星期")]
  890. public string WeekdayName { get; set; }
  891. /// <summary>
  892. /// 节次
  893. /// </summary>
  894. [DisplayName("节次")]
  895. public Guid? CoursesTimeID { get; set; }
  896. /// <summary>
  897. /// 节次
  898. /// </summary>
  899. [DisplayName("节次")]
  900. public string CoursesTimeName { get; set; }
  901. /// <summary>
  902. /// 教室ID
  903. /// </summary>
  904. [DisplayName("教室ID")]
  905. public Guid? ClassroomID { get; set; }
  906. /// <summary>
  907. /// 教室
  908. /// </summary>
  909. [DisplayName("教室")]
  910. public string ClassroomName { get; set; }
  911. /// <summary>
  912. /// 上课时间
  913. /// </summary>
  914. [DisplayName("上课时间")]
  915. public string WeekdayTimesSegmentName { get; set; }
  916. /// <summary>
  917. /// 任课教师
  918. /// </summary>
  919. [DisplayName("任课教师")]
  920. public Guid? TeacherUserID { get; set; }
  921. /// <summary>
  922. /// 教职工号
  923. /// </summary>
  924. [DisplayName("教职工号")]
  925. public string TeacherUserCode { get; set; }
  926. /// <summary>
  927. /// 任课教师
  928. /// </summary>
  929. [DisplayName("任课教师")]
  930. public string TeacherName { get; set; }
  931. /// <summary>
  932. /// 已选人数
  933. /// </summary>
  934. [DisplayName("已选人数")]
  935. public int? StudentTotalNum { get; set; }
  936. /// <summary>
  937. /// 开放状态
  938. /// </summary>
  939. [DisplayName("开放状态")]
  940. public bool IsOpened { get; set; }
  941. /// <summary>
  942. /// 开放状态
  943. /// </summary>
  944. public string IsOpenedDesc
  945. {
  946. get { return this.IsOpened == true ? "是" : "否"; }
  947. }
  948. /// <summary>
  949. /// 状态
  950. /// </summary>
  951. public int? RecordStatus { get; set; }
  952. /// <summary>
  953. /// 审核状态
  954. /// </summary>
  955. [DisplayName("状态")]
  956. public string RecordStatusName
  957. {
  958. get
  959. {
  960. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_SelectCourseResultStatus.ToString())
  961. .Where(x => x.Value == RecordStatus)
  962. .Select(x => x.Name).FirstOrDefault();
  963. }
  964. }
  965. /// <summary>
  966. /// 状态
  967. /// </summary>
  968. [DisplayName("状态")]
  969. public string RecordStatusCode
  970. {
  971. get
  972. {
  973. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_SelectCourseResultStatus.ToString())
  974. .Where(x => x.Value == RecordStatus)
  975. .Select(x => x.Code).FirstOrDefault();
  976. }
  977. }
  978. }
  979. }