GradSpecialtyPlanView.cs 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. using EMIS.ViewModel.CacheManage;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.Linq;
  7. using System.Text;
  8. namespace EMIS.ViewModel.GraduationManage.GraduationRequirement
  9. {
  10. public class GradSpecialtyPlanView
  11. {
  12. /// <summary>
  13. /// 专业计划ID
  14. /// </summary>
  15. [DisplayName("专业计划ID")]
  16. public Guid? SpecialtyPlanID { get; set; }
  17. /// <summary>
  18. /// 毕业课程ID
  19. /// </summary>
  20. [DisplayName("毕业课程ID")]
  21. public Guid? GraduationCourseID { get; set; }
  22. /// <summary>
  23. /// 年级专业ID
  24. /// </summary>
  25. [Required]
  26. [DisplayName("年级专业ID")]
  27. public Guid? GrademajorID { get; set; }
  28. /// <summary>
  29. /// 年级专业编号
  30. /// </summary>
  31. [DisplayName("年级专业编号")]
  32. public string GrademajorCode { get; set; }
  33. /// <summary>
  34. /// 年级专业名称
  35. /// </summary>
  36. [DisplayName("年级专业名称")]
  37. public string GrademajorName { get; set; }
  38. /// <summary>
  39. /// 院系专业ID
  40. /// </summary>
  41. [DisplayName("院系专业ID")]
  42. public Guid? FacultymajorID { get; set; }
  43. /// <summary>
  44. /// 院系专业编号
  45. /// </summary>
  46. [DisplayName("院系专业编号")]
  47. public string FacultymajorNo { get; set; }
  48. /// <summary>
  49. /// 院系专业名称
  50. /// </summary>
  51. [DisplayName("院系专业名称")]
  52. public string FacultymajorName { get; set; }
  53. /// <summary>
  54. /// 院系所ID
  55. /// </summary>
  56. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  57. public Guid? CollegeID { get; set; }
  58. /// <summary>
  59. /// 院系所代码
  60. /// </summary>
  61. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  62. public string CollegeNo { get; set; }
  63. /// <summary>
  64. /// 院系所名称
  65. /// </summary>
  66. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  67. public string CollegeName { get; set; }
  68. /// <summary>
  69. /// 校区ID
  70. /// </summary>
  71. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")]
  72. public Guid? CampusID { get; set; }
  73. /// <summary>
  74. /// 毕业学期ID
  75. /// </summary>
  76. [DisplayName("毕业学期ID")]
  77. public Guid? GraduatingSemesterID { get; set; }
  78. /// <summary>
  79. /// 毕业学期
  80. /// </summary>
  81. [DisplayName("毕业学期")]
  82. public string GraduatingSemesterCode { get; set; }
  83. /// <summary>
  84. /// 年级
  85. /// </summary>
  86. [DisplayName("年级")]
  87. public int? GradeID { get; set; }
  88. /// <summary>
  89. /// 专业ID(Value)
  90. /// </summary>
  91. [DisplayName("专业ID(Value)")]
  92. public int? StandardID { get; set; }
  93. /// <summary>
  94. /// 专业代码
  95. /// </summary>
  96. [DisplayName("专业代码")]
  97. public string StandardCode
  98. {
  99. get
  100. {
  101. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  102. .Where(x => x.Value == StandardID)
  103. .Select(x => x.Code).FirstOrDefault();
  104. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  105. }
  106. }
  107. /// <summary>
  108. /// 专业名称
  109. /// </summary>
  110. [DisplayName("专业名称")]
  111. public string StandardName
  112. {
  113. get
  114. {
  115. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  116. .Where(x => x.Value == StandardID)
  117. .Select(x => x.Name).FirstOrDefault();
  118. }
  119. }
  120. /// <summary>
  121. /// 培养层次
  122. /// </summary>
  123. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  124. public int? EducationID { get; set; }
  125. /// <summary>
  126. /// 培养层次
  127. /// </summary>
  128. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  129. public string EducationName
  130. {
  131. get
  132. {
  133. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  134. .Where(x => x.Value == EducationID)
  135. .Select(x => x.Name).FirstOrDefault();
  136. }
  137. }
  138. /// <summary>
  139. /// 学习形式
  140. /// </summary>
  141. [DisplayName("学习形式")]
  142. public int? LearningformID { get; set; }
  143. /// <summary>
  144. /// 学习形式
  145. /// </summary>
  146. [DisplayName("学习形式")]
  147. public string LearningformName
  148. {
  149. get
  150. {
  151. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  152. .Where(x => x.Value == LearningformID)
  153. .Select(x => x.Name).FirstOrDefault();
  154. }
  155. }
  156. /// <summary>
  157. /// 学制
  158. /// </summary>
  159. [DisplayName("学制")]
  160. public decimal? LearnSystem { get; set; }
  161. /// <summary>
  162. /// 课程信息ID
  163. /// </summary>
  164. [DisplayName("课程信息ID")]
  165. public Guid? CoursematerialID { get; set; }
  166. /// <summary>
  167. /// 课程代码
  168. /// </summary>
  169. [DisplayName("课程代码")]
  170. public string CourseCode { get; set; }
  171. /// <summary>
  172. /// 课程名称
  173. /// </summary>
  174. [DisplayName("课程名称")]
  175. public string CourseName { get; set; }
  176. /// <summary>
  177. /// 课程类型
  178. /// </summary>
  179. [DisplayName("课程类型")]
  180. public int? CourseTypeID { get; set; }
  181. /// <summary>
  182. /// 课程类型
  183. /// </summary>
  184. [DisplayName("课程类型")]
  185. public string CourseTypeName
  186. {
  187. get
  188. {
  189. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseType.ToString())
  190. .Where(x => x.Value == CourseTypeID)
  191. .Select(x => x.Name).FirstOrDefault();
  192. }
  193. }
  194. /// <summary>
  195. /// 课程学分
  196. /// </summary>
  197. [DisplayName("课程学分")]
  198. public decimal? Credit { get; set; }
  199. /// <summary>
  200. /// 理论学时
  201. /// </summary>
  202. [DisplayName("理论学时")]
  203. public int? TheoryCourse { get; set; }
  204. /// <summary>
  205. /// 实践学时
  206. /// </summary>
  207. [DisplayName("实践学时")]
  208. public int? Practicehours { get; set; }
  209. /// <summary>
  210. /// 实验学时
  211. /// </summary>
  212. [DisplayName("实验学时")]
  213. public int? Trialhours { get; set; }
  214. /// <summary>
  215. /// 总学时
  216. /// </summary>
  217. [DisplayName("总学时")]
  218. public int? Totalhours
  219. {
  220. get
  221. {
  222. return (this.TheoryCourse == null ? 0 : this.TheoryCourse)
  223. + (this.Practicehours == null ? 0 : this.Practicehours);
  224. }
  225. }
  226. /// <summary>
  227. /// 开课教研室
  228. /// </summary>
  229. [DisplayName("开课教研室")]
  230. public Guid? DepartmentID { get; set; }
  231. // <summary>
  232. /// 开课教研室代码
  233. /// </summary>
  234. [DisplayName("开课教研室代码")]
  235. public string DepartmentNo { get; set; }
  236. /// <summary>
  237. /// 学年学期
  238. /// </summary>
  239. [DisplayName("学年学期")]
  240. public Guid? SchoolyearID { get; set; }
  241. /// <summary>
  242. /// 学年学期
  243. /// </summary>
  244. [DisplayName("学年学期")]
  245. public string SchoolyearCode { get; set; }
  246. /// <summary>
  247. /// Value(学年学期)
  248. /// </summary>
  249. [DisplayName("Value")]
  250. public int? Value { get; set; }
  251. /// <summary>
  252. /// 教研室
  253. /// </summary>
  254. [DisplayName("教研室")]
  255. public string DepartmentName { get; set; }
  256. /// <summary>
  257. /// 开课学年
  258. /// </summary>
  259. [DisplayName("开课学年")]
  260. public int? SchoolyearNumID { get; set; }
  261. /// <summary>
  262. /// 开课学年
  263. /// </summary>
  264. [DisplayName("开课学年")]
  265. public string SchoolyearNumName
  266. {
  267. get
  268. {
  269. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString())
  270. .Where(x => x.Value == SchoolyearNumID)
  271. .Select(x => x.Name).FirstOrDefault();
  272. }
  273. }
  274. /// <summary>
  275. /// 学期(专业计划对应的学期)
  276. /// </summary>
  277. [DisplayName("学期")]
  278. public int? SchoolcodeID { get; set; }
  279. /// <summary>
  280. /// 学期
  281. /// </summary>
  282. [DisplayName("学期")]
  283. public string SchoolcodeName
  284. {
  285. get
  286. {
  287. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Semester.ToString()).Where(x => x.Value == SchoolcodeID).Select(x => x.Name).FirstOrDefault();
  288. }
  289. }
  290. /// <summary>
  291. /// 开课学期
  292. /// </summary>
  293. [DisplayName("开课学期")]
  294. public int? StarttermID { get; set; }
  295. /// <summary>
  296. /// 开课学期
  297. /// </summary>
  298. [DisplayName("开课学期")]
  299. public string StarttermName
  300. {
  301. get
  302. {
  303. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Startterm.ToString())
  304. .Where(x => x.Value == StarttermID)
  305. .Select(x => x.Name).FirstOrDefault();
  306. }
  307. }
  308. }
  309. }