ClassmajorView.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.ComponentModel;
  7. using EMIS.ViewModel.Cache;
  8. namespace EMIS.ViewModel.Specialtyclass
  9. {
  10. public class ClassmajorView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid ClassmajorID { get; set; }
  17. /// <summary>
  18. /// 班级编号
  19. /// </summary>
  20. [Required]
  21. [DisplayName("班级编号")]
  22. [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入数字或英文字母")]
  23. public string No { get; set; }
  24. /// <summary>
  25. /// 班级名称
  26. /// </summary>
  27. [Required]
  28. [DisplayName("班级名称")]
  29. public string Name { get; set; }
  30. /// <summary>
  31. /// 简称
  32. /// </summary>
  33. [DisplayName("简称")]
  34. public string Abbreviation { get; set; }
  35. /// <summary>
  36. /// 英文名称
  37. /// </summary>
  38. [DisplayName("英文名称")]
  39. public string EnglishName { get; set; }
  40. /// <summary>
  41. /// 校区ID
  42. /// </summary>
  43. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
  44. public Guid? CampusID { get; set; }
  45. /// <summary>
  46. /// 校区代码
  47. /// </summary>
  48. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  49. public string CampusNo { get; set; }
  50. /// <summary>
  51. /// 校区名称
  52. /// </summary>
  53. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  54. public string CampusName { get; set; }
  55. /// <summary>
  56. /// 院系所ID
  57. /// </summary>
  58. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  59. public Guid? CollegeID { get; set; }
  60. /// <summary>
  61. /// 院系所代码
  62. /// </summary>
  63. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  64. public string CollegeCode { get; set; }
  65. /// <summary>
  66. /// 院系所名称
  67. /// </summary>
  68. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeName")]
  69. public string CollegeName { get; set; }
  70. /// <summary>
  71. /// 院系专业ID
  72. /// </summary>
  73. [DisplayName("院系专业ID")]
  74. public Guid? FacultymajorID { get; set; }
  75. /// <summary>
  76. /// 院系专业编号
  77. /// </summary>
  78. [DisplayName("院系专业编号")]
  79. public string FacultymajorCode { get; set; }
  80. /// <summary>
  81. /// 院系专业名称
  82. /// </summary>
  83. [DisplayName("院系专业名称")]
  84. public string FacultymajorName { get; set; }
  85. /// <summary>
  86. /// 年级专业
  87. /// </summary>
  88. [Required]
  89. [DisplayName("年级专业")]
  90. public Guid? GrademajorID { get; set; }
  91. /// <summary>
  92. /// 年级专业编号
  93. /// </summary>
  94. [DisplayName("年级专业编号")]
  95. public string GrademajorCode { get; set; }
  96. /// <summary>
  97. /// 年级专业名称
  98. /// </summary>
  99. [DisplayName("年级专业名称")]
  100. public string GrademajorName { get; set; }
  101. /// <summary>
  102. /// 年级
  103. /// </summary>
  104. [DisplayName("年级")]
  105. public int? SchoolyearID { get; set; }
  106. /// <summary>
  107. /// 目标年级
  108. /// </summary>
  109. [Required]
  110. [DisplayName("目标年级")]
  111. public int? BatchSchoolyearID { get; set; }
  112. /// <summary>
  113. /// 是否覆盖
  114. /// </summary>
  115. [DisplayName("是否覆盖")]
  116. public bool IsOverwrite { get; set; }
  117. /// <summary>
  118. /// 入学学期
  119. /// </summary>
  120. [DisplayName("入学学期")]
  121. public int? SchoolcodeID { get; set; }
  122. /// <summary>
  123. /// 入学学期
  124. /// </summary>
  125. [DisplayName("入学学期")]
  126. public string SchoolcodeName
  127. {
  128. get
  129. {
  130. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Schoolcode.ToString())
  131. .Where(x => x.Value == SchoolcodeID)
  132. .Select(x => x.Name).FirstOrDefault();
  133. }
  134. }
  135. /// <summary>
  136. /// 专业ID(Value)
  137. /// </summary>
  138. [DisplayName("专业ID(Value)")]
  139. public int? StandardID { get; set; }
  140. /// <summary>
  141. /// 专业代码
  142. /// </summary>
  143. [DisplayName("专业代码")]
  144. public string StandardCode
  145. {
  146. get
  147. {
  148. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  149. .Where(x => x.Value == StandardID)
  150. .Select(x => x.Code).FirstOrDefault();
  151. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  152. }
  153. }
  154. /// <summary>
  155. /// 专业名称
  156. /// </summary>
  157. [DisplayName("专业名称")]
  158. public string StandardName
  159. {
  160. get
  161. {
  162. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  163. .Where(x => x.Value == StandardID)
  164. .Select(x => x.Name).FirstOrDefault();
  165. }
  166. }
  167. /// <summary>
  168. /// 培养层次
  169. /// </summary>
  170. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  171. public int? EducationID { get; set; }
  172. /// <summary>
  173. /// 培养层次
  174. /// </summary>
  175. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  176. public string EducationName
  177. {
  178. get
  179. {
  180. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  181. .Where(x => x.Value == EducationID)
  182. .Select(x => x.Name).FirstOrDefault();
  183. }
  184. }
  185. /// <summary>
  186. /// 学习形式
  187. /// </summary>
  188. [DisplayName("学习形式")]
  189. public int? LearningformID { get; set; }
  190. /// <summary>
  191. /// 学习形式
  192. /// </summary>
  193. [DisplayName("学习形式")]
  194. public string LearningformName
  195. {
  196. get
  197. {
  198. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  199. .Where(x => x.Value == LearningformID)
  200. .Select(x => x.Name).FirstOrDefault();
  201. }
  202. }
  203. /// <summary>
  204. /// 学制
  205. /// </summary>
  206. [DisplayName("学制")]
  207. public decimal? LearnSystem { get; set; }
  208. // <summary>
  209. /// 毕业学期
  210. /// </summary>
  211. [DisplayName("毕业学期")]
  212. public Guid? GraduatingSemesterID { get; set; }
  213. /// <summary>
  214. /// 毕业学期对应的Value值
  215. /// </summary>
  216. [DisplayName("值")]
  217. public int? Value { get; set; }
  218. /// <summary>
  219. /// 毕业学期
  220. /// </summary>
  221. [DisplayName("毕业学期")]
  222. public string GraduatingSemesterCode { get; set; }
  223. /// <summary>
  224. /// 班序
  225. /// </summary>
  226. [Required]
  227. [DisplayName("班序")]
  228. [RegularExpression(@"^[1-9]\d*|0$", ErrorMessage = "请输入自然数")]
  229. public int? ClassNum { get; set; }
  230. /// <summary>
  231. /// 班序(Excel导入)
  232. /// </summary>
  233. [DisplayName("班序")]
  234. public string ClassNumStr { get; set; }
  235. /// <summary>
  236. /// 班主任
  237. /// </summary>
  238. [DisplayName("班主任")]
  239. public Guid? UserID { get; set; }
  240. /// <summary>
  241. /// 班主任
  242. /// </summary>
  243. [DisplayName("班主任")]
  244. public string UserName { get; set; }
  245. /// <summary>
  246. /// 辅导员
  247. /// </summary>
  248. [DisplayName("辅导员")]
  249. public Guid? AssistantUserID { get; set; }
  250. /// <summary>
  251. /// 辅导员
  252. /// </summary>
  253. [DisplayName("辅导员")]
  254. public string AssistantUserName { get; set; }
  255. /// <summary>
  256. /// 固定教室
  257. /// </summary>
  258. [DisplayName("固定教室")]
  259. public string Fixedclassroom { get; set; }
  260. /// <summary>
  261. /// 学生人数
  262. /// </summary>
  263. [DisplayName("学生人数")]
  264. public int? StudentCount { get; set; }
  265. /// <summary>
  266. /// 校区
  267. /// </summary>
  268. public int? SchoolAreaID { get; set; }
  269. public string SchoolAreaName
  270. {
  271. get
  272. {
  273. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolArea.ToString())
  274. .Where(x => x.Value == SchoolAreaID)
  275. .Select(x => x.Name).FirstOrDefault();
  276. }
  277. }
  278. /// <summary>
  279. /// 备注
  280. /// </summary>
  281. [DisplayName("备注")]
  282. public string Remark { get; set; }
  283. /// <summary>
  284. /// 错误信息(Excel导入)
  285. /// </summary>
  286. [DisplayName("未导入原因")]
  287. public string ErrorMessage { get; set; }
  288. /// <summary>
  289. /// 状态
  290. /// </summary>
  291. [DisplayName("状态")]
  292. public int? RecordStatus { get; set; }
  293. /// <summary>
  294. /// 创建人
  295. /// </summary>
  296. [DisplayName("创建人")]
  297. public Guid? CreateUserID { get; set; }
  298. /// <summary>
  299. /// 创建时间
  300. /// </summary>
  301. [DisplayName("创建时间")]
  302. public DateTime? CreateTime { get; set; }
  303. /// <summary>
  304. /// 修改人
  305. /// </summary>
  306. [DisplayName("修改人")]
  307. public Guid? ModifyUserID { get; set; }
  308. /// <summary>
  309. /// 修改时间
  310. /// </summary>
  311. [DisplayName("修改时间")]
  312. public DateTime? ModifyTime { get; set; }
  313. }
  314. }