SpecialtyClassSettingView.cs 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Linq;
  6. using System.Text;
  7. using EMIS.ViewModel.CacheManage;
  8. namespace EMIS.ViewModel.EnrollManage.SpecialtyManage
  9. {
  10. public class SpecialtyClassSettingView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid SpecialtyClassSettingID { get; set; }
  17. /// <summary>
  18. /// 专业信息ID
  19. /// </summary>
  20. [Required]
  21. [DisplayName("专业信息ID")]
  22. public Guid? SpecialtyID { get; set; }
  23. /// <summary>
  24. /// 专业ID(Value)
  25. /// </summary>
  26. [DisplayName("专业ID(Value)")]
  27. public int? StandardID { get; set; }
  28. /// <summary>
  29. /// 专业代码
  30. /// </summary>
  31. [DisplayName("专业代码")]
  32. public string StandardCode { get; set; }
  33. /// <summary>
  34. /// 专业名称
  35. /// </summary>
  36. [DisplayName("专业名称")]
  37. public string StandardName { get; set; }
  38. /// <summary>
  39. /// 专业代码(6位)
  40. /// </summary>
  41. [DisplayName("专业代码")]
  42. public string Code
  43. {
  44. get
  45. {
  46. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString()).Where(x => x.Value == StandardID).Select(x => x.Code).FirstOrDefault();
  47. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  48. }
  49. }
  50. /// <summary>
  51. /// 专业名称
  52. /// </summary>
  53. [DisplayName("专业名称")]
  54. public string Name
  55. {
  56. get
  57. {
  58. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString()).Where(x => x.Value == StandardID).Select(x => x.Name).FirstOrDefault();
  59. }
  60. }
  61. /// <summary>
  62. /// 培养层次
  63. /// </summary>
  64. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  65. public int? EducationID { get; set; }
  66. /// <summary>
  67. /// 培养层次
  68. /// </summary>
  69. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  70. public string EducationName
  71. {
  72. get
  73. {
  74. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString()).Where(x => x.Value == EducationID).Select(x => x.Name).FirstOrDefault();
  75. }
  76. }
  77. /// <summary>
  78. /// 学习形式
  79. /// </summary>
  80. [DisplayName("学习形式")]
  81. public int? LearningformID { get; set; }
  82. /// <summary>
  83. /// 学习形式
  84. /// </summary>
  85. [DisplayName("学习形式")]
  86. public string LearningformName
  87. {
  88. get
  89. {
  90. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString()).Where(x => x.Value == LearningformID).Select(x => x.Name).FirstOrDefault();
  91. }
  92. }
  93. /// <summary>
  94. /// 学制
  95. /// </summary>
  96. [DisplayName("学制")]
  97. [DisplayFormat(DataFormatString = "{0:#.#}")]
  98. public decimal? LearnSystem { get; set; }
  99. /// <summary>
  100. /// 专业科类
  101. /// </summary>
  102. [DisplayName("专业科类")]
  103. public int? ScienceclassID { get; set; }
  104. /// <summary>
  105. /// 专业科类
  106. /// </summary>
  107. [DisplayName("专业科类")]
  108. public string ScienceclassName
  109. {
  110. get
  111. {
  112. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Scienceclass.ToString()).Where(x => x.Value == ScienceclassID).Select(x => x.Name).FirstOrDefault();
  113. }
  114. }
  115. /// <summary>
  116. /// 专业属性
  117. /// </summary>
  118. [DisplayName("专业属性")]
  119. public int? PropertyID { get; set; }
  120. /// <summary>
  121. /// 专业属性
  122. /// </summary>
  123. [DisplayName("专业属性")]
  124. public string PropertyName
  125. {
  126. get
  127. {
  128. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Property.ToString()).Where(x => x.Value == PropertyID).Select(x => x.Name).FirstOrDefault();
  129. }
  130. }
  131. /// <summary>
  132. /// 专业称号
  133. /// </summary>
  134. [DisplayName("专业称号")]
  135. public int? StandardTitle { get; set; }
  136. /// <summary>
  137. /// 专业称号
  138. /// </summary>
  139. [DisplayName("专业称号")]
  140. public string StandardTitleName
  141. {
  142. get
  143. {
  144. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StandardTitle.ToString()).Where(x => x.Value == StandardTitle).Select(x => x.Name).FirstOrDefault();
  145. }
  146. }
  147. /// <summary>
  148. /// 称号级别
  149. /// </summary>
  150. [DisplayName("称号级别")]
  151. public int? StandardLevel { get; set; }
  152. /// <summary>
  153. /// 称号级别
  154. /// </summary>
  155. [DisplayName("称号级别")]
  156. public string StandardLevelName
  157. {
  158. get
  159. {
  160. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StandardLevel.ToString()).Where(x => x.Value == StandardLevel).Select(x => x.Name).FirstOrDefault();
  161. }
  162. }
  163. /// <summary>
  164. /// 计划招生人数
  165. /// </summary>
  166. [Required]
  167. [DisplayName("计划招生人数")]
  168. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  169. public int? PlanRecruitStudentCount { get; set; }
  170. /// <summary>
  171. /// 每班预招人数
  172. /// </summary>
  173. [Required]
  174. [DisplayName("每班预招人数")]
  175. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  176. public int? ClassArrangeStudentCount { get; set; }
  177. /// <summary>
  178. /// 每班最大人数
  179. /// </summary>
  180. [Required]
  181. [DisplayName("每班最大人数")]
  182. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  183. public int? ClassMaxStudentCount { get; set; }
  184. /// <summary>
  185. /// 班级个数
  186. /// </summary>
  187. [Required]
  188. [DisplayName("班级个数")]
  189. [RegularExpression(@"^[0-9]*[1-9][0-9]*$", ErrorMessage = "请输入正整数")]
  190. public int? ClassNumber { get; set; }
  191. /// <summary>
  192. /// 状态
  193. /// </summary>
  194. [DisplayName("状态")]
  195. public int? RecordStatus { get; set; }
  196. /// <summary>
  197. /// 创建人
  198. /// </summary>
  199. [DisplayName("创建人")]
  200. public Guid? CreateUserID { get; set; }
  201. /// <summary>
  202. /// 创建时间
  203. /// </summary>
  204. [DisplayName("创建时间")]
  205. public DateTime? CreateTime { get; set; }
  206. /// <summary>
  207. /// 修改人
  208. /// </summary>
  209. [DisplayName("修改人")]
  210. public Guid? ModifyUserID { get; set; }
  211. /// <summary>
  212. /// 修改时间
  213. /// </summary>
  214. [DisplayName("修改时间")]
  215. public DateTime? ModifyTime { get; set; }
  216. }
  217. }