GrademajorRequirementView.cs 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  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.GraduationManage.GraduationRequirement
  9. {
  10. public class GrademajorRequirementView
  11. {
  12. /// <summary>
  13. /// 专业学分ID
  14. /// </summary>
  15. [DisplayName("专业学分ID")]
  16. public Guid GraduationRequirementID { 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. [DisplayFormat(DataFormatString = "{0:N1}")]
  183. [RegularExpression(@"^\d+(\.\d{1,1})?$", ErrorMessage = "请输整数或保留1位小数")]
  184. public decimal? OptionalCourseCredit { get; set; }
  185. /// <summary>
  186. /// 必修学分
  187. /// </summary>
  188. [Required]
  189. [DisplayName("必修学分")]
  190. [DisplayFormat(DataFormatString = "{0:N1}")]
  191. [RegularExpression(@"^\d+(\.\d{1,1})?$", ErrorMessage = "请输整数或保留1位小数")]
  192. public decimal? RequiredCredit { get; set; }
  193. /// <summary>
  194. /// 总学分
  195. /// </summary>
  196. [Required]
  197. [DisplayName("总学分")]
  198. [DisplayFormat(DataFormatString = "{0:N1}")]
  199. [RegularExpression(@"^\d+(\.\d{1,1})?$", ErrorMessage = "请输整数或保留1位小数")]
  200. public decimal? TotalCredit { get; set; }
  201. /// <summary>
  202. /// 特定学分
  203. /// </summary>
  204. [DisplayName("特定学分")]
  205. public decimal? SpecialCredit
  206. {
  207. get
  208. {
  209. return (this.TotalCredit == null ? 0 : this.TotalCredit)
  210. - (this.RequiredCredit == null ? 0 : this.RequiredCredit)
  211. - (this.OptionalCourseCredit == null ? 0 : this.OptionalCourseCredit);
  212. }
  213. }
  214. /// <summary>
  215. /// 状态
  216. /// </summary>
  217. [DisplayName("状态")]
  218. public int? RecordStatus { get; set; }
  219. /// <summary>
  220. /// 创建人
  221. /// </summary>
  222. [DisplayName("创建人")]
  223. public Guid? CreateUserID { get; set; }
  224. /// <summary>
  225. /// 创建时间
  226. /// </summary>
  227. [DisplayName("创建时间")]
  228. public DateTime? CreateTime { get; set; }
  229. /// <summary>
  230. /// 修改人
  231. /// </summary>
  232. [DisplayName("修改人")]
  233. public Guid? ModifyUserID { get; set; }
  234. /// <summary>
  235. /// 修改时间
  236. /// </summary>
  237. [DisplayName("修改时间")]
  238. public DateTime? ModifyTime { get; set; }
  239. }
  240. }