CollegeView.cs 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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
  9. {
  10. public class CollegeView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  16. public Guid CollegeID { get; set; }
  17. /// <summary>
  18. /// 院系所代码
  19. /// </summary>
  20. [Required]
  21. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  22. [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入数字或英文字母")]
  23. public string No { get; set; }
  24. /// <summary>
  25. /// 院系所名称
  26. /// </summary>
  27. [Required]
  28. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeName")]
  29. public string Name { get; set; }
  30. /// <summary>
  31. /// 简称
  32. /// </summary>
  33. [DisplayName("简称")]
  34. public string SimpleName { get; set; }
  35. /// <summary>
  36. /// 英文名称
  37. /// </summary>
  38. [DisplayName("英文名称")]
  39. public string EnglishName { get; set; }
  40. /// <summary>
  41. /// 校区ID
  42. /// </summary>
  43. [Required]
  44. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")]
  45. public Guid? CampusID { get; set; }
  46. /// <summary>
  47. /// 校区代码
  48. /// </summary>
  49. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  50. public string CampusNo { get; set; }
  51. /// <summary>
  52. /// 校区名称
  53. /// </summary>
  54. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  55. public string CampusName { get; set; }
  56. /// <summary>
  57. /// 党务负责人
  58. /// </summary>
  59. [DisplayName("党务负责人")]
  60. public Guid? PoliticalManager { get; set; }
  61. /// <summary>
  62. /// 党务负责人
  63. /// </summary>
  64. [DisplayName("党务负责人")]
  65. public string PoliticalManagerName { get; set; }
  66. /// <summary>
  67. /// 行政负责人
  68. /// </summary>
  69. [DisplayName("行政负责人")]
  70. public Guid? AdministrativeManager { get; set; }
  71. /// <summary>
  72. /// 行政负责人
  73. /// </summary>
  74. [DisplayName("行政负责人")]
  75. public string AdministrativeManagerName { get; set; }
  76. /// <summary>
  77. /// 单位类别
  78. /// </summary>
  79. [Required]
  80. [DisplayName("单位类别")]
  81. public int? UnitCategoryID { get; set; }
  82. /// <summary>
  83. /// 单位类别
  84. /// </summary>
  85. [DisplayName("单位类别")]
  86. public string UnitCategoryStr { get; set; }
  87. /// <summary>
  88. /// 单位类别
  89. /// </summary>
  90. [DisplayName("单位类别")]
  91. public string UnitCategoryName
  92. {
  93. get
  94. {
  95. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_UnitCategory.ToString())
  96. .Where(x => x.Value == UnitCategoryID)
  97. .Select(x => x.Name).FirstOrDefault();
  98. }
  99. }
  100. /// <summary>
  101. /// 院系类型
  102. /// </summary>
  103. [DisplayName("院系类型")]
  104. public int? CollegeTypeID { get; set; }
  105. /// <summary>
  106. /// 院系类型
  107. /// </summary>
  108. [DisplayName("院系类型")]
  109. public string CollegeTypeName
  110. {
  111. get
  112. {
  113. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CollegeType.ToString())
  114. .Where(x => x.Value == CollegeTypeID)
  115. .Select(x => x.Name).FirstOrDefault();
  116. }
  117. }
  118. /// <summary>
  119. /// 院系类别
  120. /// </summary>
  121. [DisplayName("院系类别")]
  122. public int? CollegeCategoryID { get; set; }
  123. /// <summary>
  124. /// 院系类别
  125. /// </summary>
  126. [DisplayName("院系类别")]
  127. public string CollegeCategoryName
  128. {
  129. get
  130. {
  131. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CollegeCategory.ToString())
  132. .Where(x => x.Value == CollegeCategoryID)
  133. .Select(x => x.Name).FirstOrDefault();
  134. }
  135. }
  136. /// <summary>
  137. /// 办学类别
  138. /// </summary>
  139. [DisplayName("办学类别")]
  140. public int? RunByCategoryID { get; set; }
  141. /// <summary>
  142. /// 办学类别
  143. /// </summary>
  144. [DisplayName("办学类别")]
  145. public string RunByCategoryName
  146. {
  147. get
  148. {
  149. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_RunByCategory.ToString())
  150. .Where(x => x.Value == RunByCategoryID)
  151. .Select(x => x.Name).FirstOrDefault();
  152. }
  153. }
  154. /// <summary>
  155. /// 建立年月
  156. /// </summary>
  157. [DisplayName("建立年月")]
  158. public DateTime? FoundDate { get; set; }
  159. /// <summary>
  160. /// 建立年月
  161. /// </summary>
  162. [DisplayName("建立年月")]
  163. public string FoundDateStr { get; set; }
  164. /// <summary>
  165. /// 办公电话
  166. /// </summary>
  167. [DisplayName("办公电话")]
  168. public string Officephone { get; set; }
  169. /// <summary>
  170. /// 备注
  171. /// </summary>
  172. [DisplayName("备注")]
  173. public string Remark { get; set; }
  174. /// <summary>
  175. /// 错误信息(Excel导入)
  176. /// </summary>
  177. [DisplayName("未导入原因")]
  178. public string ErrorMessage { get; set; }
  179. /// <summary>
  180. /// 状态
  181. /// </summary>
  182. [DisplayName("状态")]
  183. public int? RecordStatus { get; set; }
  184. /// <summary>
  185. /// 创建人
  186. /// </summary>
  187. [DisplayName("创建人")]
  188. public Guid? CreateUserID { get; set; }
  189. /// <summary>
  190. /// 创建时间
  191. /// </summary>
  192. [DisplayName("创建时间")]
  193. public DateTime? CreateTime { get; set; }
  194. /// <summary>
  195. /// 修改人
  196. /// </summary>
  197. [DisplayName("修改人")]
  198. public Guid? ModifyUserID { get; set; }
  199. /// <summary>
  200. /// 修改时间
  201. /// </summary>
  202. [DisplayName("修改时间")]
  203. public DateTime? ModifyTime { get; set; }
  204. }
  205. }