UniversityView.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  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 UniversityView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid UniversityID { get; set; }
  17. /// <summary>
  18. /// 学校代码
  19. /// </summary>
  20. [Required]
  21. [DisplayName("学校代码")]
  22. [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入数字或英文字母")]
  23. public string Code { 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 SimpleName { get; set; }
  35. /// <summary>
  36. /// 英文名称
  37. /// </summary>
  38. [DisplayName("英文名称")]
  39. public string EnglishName { get; set; }
  40. /// <summary>
  41. /// 所属省份
  42. /// </summary>
  43. [DisplayName("所属省份")]
  44. public int? ProvinceID { get; set; }
  45. /// <summary>
  46. /// 所属省份
  47. /// </summary>
  48. [DisplayName("所属省份")]
  49. public string ProvinceName
  50. {
  51. get
  52. {
  53. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Province.ToString())
  54. .Where(x => x.Value == ProvinceID)
  55. .Select(x => x.Name).FirstOrDefault();
  56. }
  57. }
  58. /// <summary>
  59. /// 所属市
  60. /// </summary>
  61. [DisplayName("所属市")]
  62. public int? CityID { get; set; }
  63. /// <summary>
  64. /// 所属市
  65. /// </summary>
  66. [DisplayName("所属市")]
  67. public string CityName
  68. {
  69. get
  70. {
  71. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Region.ToString())
  72. .Where(x => x.Value == CityID)
  73. .Select(x => x.Name).FirstOrDefault();
  74. }
  75. }
  76. /// <summary>
  77. /// 所属区
  78. /// </summary>
  79. [DisplayName("所属区")]
  80. public int? DistrictID { get; set; }
  81. /// <summary>
  82. /// 所属区
  83. /// </summary>
  84. [DisplayName("所属区")]
  85. public string DistrictName
  86. {
  87. get
  88. {
  89. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Region.ToString())
  90. .Where(x => x.Value == DistrictID)
  91. .Select(x => x.Name).FirstOrDefault();
  92. }
  93. }
  94. /// <summary>
  95. /// 学校性质
  96. /// </summary>
  97. [DisplayName("学校性质")]
  98. public int? PropertyID { get; set; }
  99. /// <summary>
  100. /// 学校性质
  101. /// </summary>
  102. [DisplayName("学校性质")]
  103. public string PropertyName
  104. {
  105. get
  106. {
  107. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_UniversityProperty.ToString())
  108. .Where(x => x.Value == PropertyID)
  109. .Select(x => x.Name).FirstOrDefault();
  110. }
  111. }
  112. /// <summary>
  113. /// 办学类型
  114. /// </summary>
  115. [Required]
  116. [DisplayName("办学类型")]
  117. public int? SchoolTypeID { get; set; }
  118. /// <summary>
  119. /// 办学类型
  120. /// </summary>
  121. [DisplayName("办学类型")]
  122. public string SchoolTypeName
  123. {
  124. get
  125. {
  126. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolType.ToString())
  127. .Where(x => x.Value == SchoolTypeID)
  128. .Select(x => x.Name).FirstOrDefault();
  129. }
  130. }
  131. /// <summary>
  132. /// 主管部门
  133. /// </summary>
  134. [DisplayName("主管部门")]
  135. public int? ManagerID { get; set; }
  136. /// <summary>
  137. /// 主管部门
  138. /// </summary>
  139. [DisplayName("主管部门")]
  140. public string ManagerName
  141. {
  142. get
  143. {
  144. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ManagerType.ToString())
  145. .Where(x => x.Value == SchoolTypeID)
  146. .Select(x => x.Name).FirstOrDefault();
  147. }
  148. }
  149. /// <summary>
  150. /// 举办者
  151. /// </summary>
  152. [DisplayName("举办者")]
  153. public int? FounderTypeID { get; set; }
  154. /// <summary>
  155. /// 举办者
  156. /// </summary>
  157. [DisplayName("举办者")]
  158. public string FounderTypeName
  159. {
  160. get
  161. {
  162. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_FounderType.ToString())
  163. .Where(x => x.Value == FounderTypeID)
  164. .Select(x => x.Name).FirstOrDefault();
  165. }
  166. }
  167. /// <summary>
  168. /// 学校级别
  169. /// </summary>
  170. [DisplayName("学校级别")]
  171. public int? SchoolLevelID { get; set; }
  172. /// <summary>
  173. /// 学校级别
  174. /// </summary>
  175. [DisplayName("学校级别")]
  176. public string SchoolLevelName
  177. {
  178. get
  179. {
  180. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolLevel.ToString())
  181. .Where(x => x.Value == SchoolLevelID)
  182. .Select(x => x.Name).FirstOrDefault();
  183. }
  184. }
  185. /// <summary>
  186. /// 校长
  187. /// </summary>
  188. [DisplayName("校长")]
  189. public string HeadMasterName { get; set; }
  190. /// <summary>
  191. /// 党务负责人
  192. /// </summary>
  193. [DisplayName("党务负责人")]
  194. public Guid? PartyManageID { get; set; }
  195. /// <summary>
  196. /// 党务负责人
  197. /// </summary>
  198. [DisplayName("党务负责人")]
  199. public string PartyManageName { get; set; }
  200. /// <summary>
  201. /// 法人代表
  202. /// </summary>
  203. [DisplayName("法人代表")]
  204. public string LegalPersonName { get; set; }
  205. /// <summary>
  206. /// 创校日期
  207. /// </summary>
  208. [DisplayName("创校日期")]
  209. public DateTime? BuildDate { get; set; }
  210. /// <summary>
  211. /// 校庆日期
  212. /// </summary>
  213. [DisplayName("校庆日期")]
  214. public DateTime? AnniversaryDate { get; set; }
  215. /// <summary>
  216. /// 建校基础
  217. /// </summary>
  218. [DisplayName("建校基础")]
  219. public string SchoolBasis { get; set; }
  220. /// <summary>
  221. /// 校训
  222. /// </summary>
  223. [DisplayName("校训")]
  224. public string SchoolMotto { get; set; }
  225. /// <summary>
  226. /// 学科门数
  227. /// </summary>
  228. [DisplayName("学科门数")]
  229. [RegularExpression(@"^[0-9]*[1-9][0-9]*$", ErrorMessage = "请输入正整数")]
  230. public int? SubjectCount { get; set; }
  231. /// <summary>
  232. /// 是否211工程院校
  233. /// </summary>
  234. [DisplayName("是否211工程院校")]
  235. public bool Is211University { get; set; }
  236. /// <summary>
  237. /// 是否重点院校
  238. /// </summary>
  239. [DisplayName("是否重点院校")]
  240. public bool IsKeyUniversity { get; set; }
  241. /// <summary>
  242. /// 是否附设成教学院
  243. /// </summary>
  244. [DisplayName("是否附设成教学院")]
  245. public bool IsAdultCollege { get; set; }
  246. /// <summary>
  247. /// 是否设立研究生院
  248. /// </summary>
  249. [DisplayName("是否设立研究生院")]
  250. public bool IsPostCollege { get; set; }
  251. /// <summary>
  252. /// 是否附设网络学院
  253. /// </summary>
  254. [DisplayName("是否附设网络学院")]
  255. public bool IsNetCollege { get; set; }
  256. /// <summary>
  257. /// 联系电话
  258. /// </summary>
  259. [DisplayName("联系电话")]
  260. public string Telephone { get; set; }
  261. /// <summary>
  262. /// 邮政编码
  263. /// </summary>
  264. [DisplayName("邮政编码")]
  265. public string ZIPCode { get; set; }
  266. /// <summary>
  267. /// 电子邮件
  268. /// </summary>
  269. [DisplayName("电子邮件")]
  270. public string Email { get; set; }
  271. /// <summary>
  272. /// 传真
  273. /// </summary>
  274. [DisplayName("传真")]
  275. public string FAX { get; set; }
  276. /// <summary>
  277. /// 微信公众号
  278. /// </summary>
  279. [DisplayName("微信公众号")]
  280. public string PublicNum { get; set; }
  281. /// <summary>
  282. /// 主页地址
  283. /// </summary>
  284. [DisplayName("主页地址")]
  285. public string HomePage { get; set; }
  286. /// <summary>
  287. /// 学校地址
  288. /// </summary>
  289. [DisplayName("学校地址")]
  290. public string Address { get; set; }
  291. /// <summary>
  292. /// 学校英文地址
  293. /// </summary>
  294. [DisplayName("学校英文地址")]
  295. public string EnglishAddress { get; set; }
  296. /// <summary>
  297. /// 历史沿革
  298. /// </summary>
  299. [DisplayName("历史沿革")]
  300. public string HistoryEvolution { get; set; }
  301. /// <summary>
  302. /// 备注
  303. /// </summary>
  304. [DisplayName("备注")]
  305. public string Remark { get; set; }
  306. /// <summary>
  307. /// 状态
  308. /// </summary>
  309. [DisplayName("状态")]
  310. public int? RecordStatus { get; set; }
  311. /// <summary>
  312. /// 创建人
  313. /// </summary>
  314. [DisplayName("创建人")]
  315. public Guid? CreateUserID { get; set; }
  316. /// <summary>
  317. /// 创建时间
  318. /// </summary>
  319. [DisplayName("创建时间")]
  320. public DateTime? CreateTime { get; set; }
  321. /// <summary>
  322. /// 修改人
  323. /// </summary>
  324. [DisplayName("修改人")]
  325. public Guid? ModifyUserID { get; set; }
  326. /// <summary>
  327. /// 修改时间
  328. /// </summary>
  329. [DisplayName("修改时间")]
  330. public DateTime? ModifyTime { get; set; }
  331. }
  332. }