CourseTypeRequirementView.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  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.GraduationManage.GraduationRequirement
  9. {
  10. public class CourseTypeRequirementView
  11. {
  12. /// <summary>
  13. /// 类型学分ID(课程类型学分)
  14. /// </summary>
  15. [DisplayName("类型学分ID")]
  16. public Guid GraduationCourseTypeRequirementID { get; set; }
  17. /// <summary>
  18. /// 年级专业ID
  19. /// </summary>
  20. [Required]
  21. [DisplayName("年级专业ID")]
  22. public Guid? GrademajorID { get; set; }
  23. /// <summary>
  24. /// 年级专业编号
  25. /// </summary>
  26. [DisplayName("年级专业编号")]
  27. public string GrademajorCode { get; set; }
  28. /// <summary>
  29. /// 年级专业名称
  30. /// </summary>
  31. [DisplayName("年级专业名称")]
  32. public string GrademajorName { get; set; }
  33. /// <summary>
  34. /// 院系专业ID
  35. /// </summary>
  36. [DisplayName("院系专业ID")]
  37. public Guid? FacultymajorID { get; set; }
  38. /// <summary>
  39. /// 院系专业编号
  40. /// </summary>
  41. [DisplayName("院系专业编号")]
  42. public string FacultymajorNo { get; set; }
  43. /// <summary>
  44. /// 院系专业名称
  45. /// </summary>
  46. [DisplayName("院系专业名称")]
  47. public string FacultymajorName { get; set; }
  48. /// <summary>
  49. /// 院系所ID
  50. /// </summary>
  51. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  52. public Guid? CollegeID { get; set; }
  53. /// <summary>
  54. /// 院系所代码
  55. /// </summary>
  56. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  57. public string CollegeNo { get; set; }
  58. /// <summary>
  59. /// 院系所名称
  60. /// </summary>
  61. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  62. public string CollegeName { get; set; }
  63. /// <summary>
  64. /// 年级
  65. /// </summary>
  66. [DisplayName("年级")]
  67. public int? SchoolyearID { get; set; }
  68. /// <summary>
  69. /// 学期
  70. /// </summary>
  71. [DisplayName("学期")]
  72. public int? SchoolcodeID { get; set; }
  73. /// <summary>
  74. /// 学期
  75. /// </summary>
  76. [DisplayName("学期")]
  77. public string SchoolcodeName
  78. {
  79. get
  80. {
  81. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Semester.ToString()).Where(x => x.Value == SchoolcodeID).Select(x => x.Name).FirstOrDefault();
  82. }
  83. }
  84. /// <summary>
  85. /// 入学学年学期ID
  86. /// </summary>
  87. [DisplayName("入学学年学期ID")]
  88. public Guid? EnteringSchoolYearID { get; set; }
  89. /// <summary>
  90. /// 入学学年学期
  91. /// </summary>
  92. [DisplayName("入学学年学期")]
  93. public string EnteringSchoolYearCode { get; set; }
  94. /// <summary>
  95. /// 毕业学期ID
  96. /// </summary>
  97. [DisplayName("毕业学期ID")]
  98. public Guid? GraduatingSemesterID { get; set; }
  99. /// <summary>
  100. /// 毕业学期
  101. /// </summary>
  102. [DisplayName("毕业学期")]
  103. public string GraduatingSemesterCode { get; set; }
  104. /// <summary>
  105. /// 专业ID(Value)
  106. /// </summary>
  107. [DisplayName("专业ID(Value)")]
  108. public int? StandardID { get; set; }
  109. /// <summary>
  110. /// 专业代码
  111. /// </summary>
  112. [DisplayName("专业代码")]
  113. public string StandardCode
  114. {
  115. get
  116. {
  117. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  118. .Where(x => x.Value == StandardID)
  119. .Select(x => x.Code).FirstOrDefault();
  120. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  121. }
  122. }
  123. /// <summary>
  124. /// 专业名称
  125. /// </summary>
  126. [DisplayName("专业名称")]
  127. public string StandardName
  128. {
  129. get
  130. {
  131. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  132. .Where(x => x.Value == StandardID)
  133. .Select(x => x.Name).FirstOrDefault();
  134. }
  135. }
  136. /// <summary>
  137. /// 培养层次
  138. /// </summary>
  139. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  140. public int? EducationID { get; set; }
  141. /// <summary>
  142. /// 培养层次
  143. /// </summary>
  144. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  145. public string EducationName
  146. {
  147. get
  148. {
  149. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  150. .Where(x => x.Value == EducationID)
  151. .Select(x => x.Name).FirstOrDefault();
  152. }
  153. }
  154. /// <summary>
  155. /// 学习形式
  156. /// </summary>
  157. [DisplayName("学习形式")]
  158. public int? LearningformID { get; set; }
  159. /// <summary>
  160. /// 学习形式
  161. /// </summary>
  162. [DisplayName("学习形式")]
  163. public string LearningformName
  164. {
  165. get
  166. {
  167. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  168. .Where(x => x.Value == LearningformID)
  169. .Select(x => x.Name).FirstOrDefault();
  170. }
  171. }
  172. /// <summary>
  173. /// 学制
  174. /// </summary>
  175. [DisplayName("学制")]
  176. public decimal? LearnSystem { get; set; }
  177. /// <summary>
  178. /// 课程类型
  179. /// </summary>
  180. [Required]
  181. [DisplayName("课程类型")]
  182. public int? CourseTypeID { get; set; }
  183. /// <summary>
  184. /// 课程类型
  185. /// </summary>
  186. [DisplayName("课程类型")]
  187. public string CourseTypeName
  188. {
  189. get
  190. {
  191. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseType.ToString())
  192. .Where(x => x.Value == CourseTypeID)
  193. .Select(x => x.Name).FirstOrDefault();
  194. }
  195. }
  196. /// <summary>
  197. /// 是否必修
  198. /// </summary>
  199. [DisplayName("是否必修")]
  200. public bool? IsRequired { get; set; }
  201. /// <summary>
  202. /// 是否必修
  203. /// </summary>
  204. [DisplayName("是否必修")]
  205. public string IsRequiredName
  206. {
  207. get
  208. {
  209. return IsRequired == true ? "是" : "否";
  210. }
  211. }
  212. /// <summary>
  213. /// 是否限选
  214. /// </summary>
  215. [DisplayName("是否限选")]
  216. public bool? IsOptionalCourse { get; set; }
  217. /// <summary>
  218. /// 是否限选
  219. /// </summary>
  220. [DisplayName("是否限选")]
  221. public string IsOptionalCourseName
  222. {
  223. get
  224. {
  225. return IsOptionalCourse == true ? "是" : "否";
  226. }
  227. }
  228. /// <summary>
  229. /// 是否任选
  230. /// </summary>
  231. [DisplayName("是否任选")]
  232. public bool? IsFreeSelectionCourse { get; set; }
  233. /// <summary>
  234. /// 是否任选
  235. /// </summary>
  236. [DisplayName("是否任选")]
  237. public string IsFreeSelectionCourseName
  238. {
  239. get
  240. {
  241. return IsFreeSelectionCourse == true ? "是" : "否";
  242. }
  243. }
  244. /// <summary>
  245. /// 是否方向选修
  246. /// </summary>
  247. [DisplayName("是否方向选修")]
  248. public bool? IsElective { get; set; }
  249. /// <summary>
  250. /// 是否方向选修
  251. /// </summary>
  252. [DisplayName("是否方向选修")]
  253. public string IsElectiveName
  254. {
  255. get
  256. {
  257. return IsElective == true ? "是" : "否";
  258. }
  259. }
  260. /// <summary>
  261. /// 是否公共选修
  262. /// </summary>
  263. [DisplayName("是否公共选修")]
  264. public bool? IsElectivePublic { get; set; }
  265. /// <summary>
  266. /// 是否公共选修
  267. /// </summary>
  268. [DisplayName("是否公共选修")]
  269. public string IsElectivePublicName
  270. {
  271. get
  272. {
  273. return IsElectivePublic == true ? "是" : "否";
  274. }
  275. }
  276. /// <summary>
  277. /// 是否通识教育
  278. /// </summary>
  279. [DisplayName("是否通识教育")]
  280. public bool? IsGeneralEducation { get; set; }
  281. /// <summary>
  282. /// 是否通识教育
  283. /// </summary>
  284. [DisplayName("是否通识教育")]
  285. public string IsGeneralEducationName
  286. {
  287. get
  288. {
  289. return IsGeneralEducation == true ? "是" : "否";
  290. }
  291. }
  292. /// <summary>
  293. /// 是否校本课程
  294. /// </summary>
  295. [DisplayName("是否校本课程")]
  296. public bool? IsSchoolbasedCurriculum { get; set; }
  297. /// <summary>
  298. /// 是否校本课程
  299. /// </summary>
  300. [DisplayName("是否校本课程")]
  301. public string IsSchoolbasedCurriculumName
  302. {
  303. get
  304. {
  305. return IsSchoolbasedCurriculum == true ? "是" : "否";
  306. }
  307. }
  308. /// <summary>
  309. /// 是否实践环节
  310. /// </summary>
  311. [DisplayName("是否实践环节")]
  312. public bool? IsPractise { get; set; }
  313. /// <summary>
  314. /// 是否实践环节
  315. /// </summary>
  316. [DisplayName("是否实践环节")]
  317. public string IsPractiseName
  318. {
  319. get
  320. {
  321. return IsPractise == true ? "是" : "否";
  322. }
  323. }
  324. /// <summary>
  325. /// 总学分(类型学分)
  326. /// </summary>
  327. [Required]
  328. [DisplayName("类型学分")]
  329. [DisplayFormat(DataFormatString = "{0:N1}")]
  330. [RegularExpression(@"^\d+(\.\d{1,1})?$", ErrorMessage = "请输整数或保留1位小数")]
  331. public decimal? TotalCredit { get; set; }
  332. /// <summary>
  333. /// 状态
  334. /// </summary>
  335. [DisplayName("状态")]
  336. public int? RecordStatus { get; set; }
  337. /// <summary>
  338. /// 创建人
  339. /// </summary>
  340. [DisplayName("创建人")]
  341. public Guid? CreateUserID { get; set; }
  342. /// <summary>
  343. /// 创建时间
  344. /// </summary>
  345. [DisplayName("创建时间")]
  346. public DateTime? CreateTime { get; set; }
  347. /// <summary>
  348. /// 修改人
  349. /// </summary>
  350. [DisplayName("修改人")]
  351. public Guid? ModifyUserID { get; set; }
  352. /// <summary>
  353. /// 修改时间
  354. /// </summary>
  355. [DisplayName("修改时间")]
  356. public DateTime? ModifyTime { get; set; }
  357. }
  358. }