ExecutableFreeSelectionCouseSpecialtyListView.cs 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.ViewModel.EnrollManage.SpecialtyManage;
  6. using System.ComponentModel;
  7. using System.ComponentModel.DataAnnotations;
  8. using EMIS.ViewModel.CacheManage;
  9. namespace EMIS.ViewModel.SelectCourse
  10. {
  11. public class ExecutableFreeSelectionCouseSpecialtyListView : SpecialtyView
  12. {
  13. public Guid ExecutableFreeSelectionCouseID { get; set; }
  14. /// <summary>
  15. /// 主键ID
  16. /// </summary>
  17. [DisplayName("主键ID")]
  18. public Guid? SpecialtyID { get; set; }
  19. /// <summary>
  20. /// 专业名称
  21. /// </summary>
  22. [Required]
  23. [DisplayName("专业名称")]
  24. public int? StandardID { get; set; }
  25. public string InitStandardCode { get; set; }
  26. /// <summary>
  27. /// 专业名称
  28. /// </summary>
  29. [DisplayName("专业名称")]
  30. public string StandardName
  31. {
  32. get;
  33. set;
  34. }
  35. /// <summary>
  36. /// 专业代码
  37. /// </summary>
  38. [DisplayName("专业代码")]
  39. public string Code
  40. {
  41. get { return (this.InitStandardCode != null ? this.InitStandardCode.PadLeft(6, '0') : ""); }
  42. }
  43. /// <summary>
  44. /// 学制
  45. /// </summary>
  46. [Required]
  47. [DisplayName("学制")]
  48. [DisplayFormat(DataFormatString = "{0:#.#}")]
  49. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  50. public decimal? LearnSystem { get; set; }
  51. /// <summary>
  52. /// 学制
  53. /// </summary>
  54. public string LearnSystemStr { get; set; }
  55. /// <summary>
  56. /// 专业科类
  57. /// </summary>
  58. [DisplayName("专业科类")]
  59. public int? ScienceclassID { get; set; }
  60. /// <summary>
  61. /// 专业科类
  62. /// </summary>
  63. [DisplayName("专业科类")]
  64. public string ScienceclassStr { get; set; }
  65. /// <summary>
  66. /// 专业科类名称
  67. /// </summary>
  68. [DisplayName("专业科类名称")]
  69. public string ScienceclassName
  70. {
  71. get
  72. {
  73. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Scienceclass.ToString())
  74. .Where(x => x.Value == ScienceclassID)
  75. .Select(x => x.Name).FirstOrDefault();
  76. }
  77. }
  78. /// <summary>
  79. /// 学习形式
  80. /// </summary>
  81. [Required]
  82. [DisplayName("学习形式")]
  83. public int? LearningformID { get; set; }
  84. /// <summary>
  85. /// 学习形式
  86. /// </summary>
  87. [DisplayName("学习形式")]
  88. public string LearningformStr { get; set; }
  89. /// <summary>
  90. /// 学习形式名称
  91. /// </summary>
  92. [DisplayName("学习形式名称")]
  93. public string LearningformName
  94. {
  95. get
  96. {
  97. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  98. .Where(x => x.Value == LearningformID)
  99. .Select(x => x.Name).FirstOrDefault();
  100. }
  101. }
  102. /// <summary>
  103. /// 培养层次
  104. /// </summary>
  105. [Required]
  106. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  107. public int? EducationID { get; set; }
  108. /// 培养层次名称
  109. public string EducationStr { get; set; }
  110. /// <summary>
  111. /// 培养层次名称
  112. /// </summary>
  113. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  114. public string EducationName
  115. {
  116. get
  117. {
  118. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  119. .Where(x => x.Value == EducationID)
  120. .Select(x => x.Name).FirstOrDefault();
  121. }
  122. }
  123. /// <summary>
  124. /// 专业属性
  125. /// </summary>
  126. [DisplayName("专业属性")]
  127. public int? PropertyID { get; set; }
  128. /// <summary>
  129. /// 专业属性
  130. /// </summary>
  131. [DisplayName("专业属性")]
  132. public string PropertyStr { get; set; }
  133. /// <summary>
  134. /// 专业属性名称
  135. /// </summary>
  136. [DisplayName("专业属性名称")]
  137. public string PropertyName
  138. {
  139. get
  140. {
  141. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Property.ToString())
  142. .Where(x => x.Value == PropertyID)
  143. .Select(x => x.Name).FirstOrDefault();
  144. }
  145. }
  146. /// <summary>
  147. /// 年级
  148. /// </summary>
  149. [DisplayName("年级")]
  150. public int? SchoolyearID { get; set; }
  151. /// <summary>
  152. /// 专业称号
  153. /// </summary>
  154. [DisplayName("专业称号")]
  155. public int? StandardTitle { get; set; }
  156. /// <summary>
  157. /// 专业称号
  158. /// </summary>
  159. [DisplayName("专业称号")]
  160. public string StandardTitleStr { get; set; }
  161. /// <summary>
  162. /// 专业称号
  163. /// </summary>
  164. [DisplayName("专业称号")]
  165. public string StandardTitleName
  166. {
  167. get
  168. {
  169. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StandardTitle.ToString())
  170. .Where(x => x.Value == StandardTitle)
  171. .Select(x => x.Name).FirstOrDefault();
  172. }
  173. }
  174. /// <summary>
  175. /// 称号级别
  176. /// </summary>
  177. [DisplayName("称号级别")]
  178. public int? StandardLevel { get; set; }
  179. /// <summary>
  180. /// 称号级别
  181. /// </summary>
  182. [DisplayName("称号级别")]
  183. public string StandardLevelStr { get; set; }
  184. /// <summary>
  185. /// 称号级别
  186. /// </summary>
  187. [DisplayName("称号级别")]
  188. public string StandardLevelName
  189. {
  190. get
  191. {
  192. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StandardLevel.ToString())
  193. .Where(x => x.Value == StandardLevel)
  194. .Select(x => x.Name).FirstOrDefault();
  195. }
  196. }
  197. /// <summary>
  198. /// 备注
  199. /// </summary>
  200. [DisplayName("备注")]
  201. public string Remarks { get; set; }
  202. /// <summary>
  203. /// 错误信息
  204. /// </summary>
  205. [DisplayName("错误信息")]
  206. public string ErrorMessage { get; set; }
  207. /// <summary>
  208. /// 创建人
  209. /// </summary>
  210. [DisplayName("创建人")]
  211. public Guid? CreateUserID { get; set; }
  212. /// <summary>
  213. /// 创建时间
  214. /// </summary>
  215. [DisplayName("创建时间")]
  216. public DateTime? CreateTime { get; set; }
  217. private bool _isExcelVaildateOK = true;
  218. /// <summary>
  219. /// Excel验证是否通过,默认为true
  220. /// <para>true:通过;false:不通过</para>
  221. /// </summary>
  222. public bool IsExcelVaildateOK
  223. {
  224. get { return _isExcelVaildateOK; }
  225. set { _isExcelVaildateOK = value; }
  226. }
  227. }
  228. }