BuildingsInfoView.cs 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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.UniversityManage.ClassroomManage
  9. {
  10. public class BuildingsInfoView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid BuildingsInfoID { 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. /// 校区ID
  32. /// </summary>
  33. [Required]
  34. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
  35. public Guid? CampusID { get; set; }
  36. /// <summary>
  37. /// 校区代码
  38. /// </summary>
  39. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  40. public string CampusCode { get; set; }
  41. /// <summary>
  42. /// 校区名称
  43. /// </summary>
  44. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  45. public string CampusName { get; set; }
  46. /// <summary>
  47. /// 院系所ID(此为建筑信息所属的院系所ID)
  48. /// </summary>
  49. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  50. public Guid? CollegeID { get; set; }
  51. /// <summary>
  52. /// 院系所代码(此为建筑信息所属的院系所代码)
  53. /// </summary>
  54. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  55. public string CollegeCode { get; set; }
  56. /// <summary>
  57. /// 院系所(此为建筑信息所属的院系所)
  58. /// </summary>
  59. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeName")]
  60. public string CollegeName { get; set; }
  61. /// <summary>
  62. /// 校区ID(此为建筑信息所属的院系所对应的校区ID)
  63. /// </summary>
  64. [Required]
  65. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
  66. public Guid? CollegeCampusID { get; set; }
  67. /// <summary>
  68. /// 校区代码(此为建筑信息所属的院系所对应的校区代码)
  69. /// </summary>
  70. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  71. public string CollegeCampusCode { get; set; }
  72. /// <summary>
  73. /// 校区(此为建筑信息所属的院系所对应的校区)
  74. /// </summary>
  75. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  76. public string CollegeCampusName { get; set; }
  77. /// <summary>
  78. /// 建筑类型
  79. /// </summary>
  80. [Required]
  81. [DisplayName("建筑类型")]
  82. public int? BuildingsTypeID { get; set; }
  83. /// <summary>
  84. /// 建筑类型(Excel导入)
  85. /// </summary>
  86. [DisplayName("建筑类型")]
  87. public string BuildingsTypeStr { get; set; }
  88. /// <summary>
  89. /// 建筑类型
  90. /// </summary>
  91. [DisplayName("建筑类型")]
  92. public string BuildingsTypeName
  93. {
  94. get
  95. {
  96. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_BuildingsType.ToString()).Where(x => x.Value == BuildingsTypeID).Select(x => x.Name).FirstOrDefault();
  97. }
  98. }
  99. /// <summary>
  100. /// 建筑状况
  101. /// </summary>
  102. [Required]
  103. [DisplayName("建筑状况")]
  104. public int? BuildingsStatusID { get; set; }
  105. /// <summary>
  106. /// 建筑状况(Excel导入)
  107. /// </summary>
  108. [DisplayName("建筑状况")]
  109. public string BuildingsStatusStr { get; set; }
  110. /// <summary>
  111. /// 建筑状况
  112. /// </summary>
  113. [DisplayName("建筑状况")]
  114. public string BuildingsStatusName
  115. {
  116. get
  117. {
  118. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_BuildingsStatus.ToString()).Where(x => x.Value == BuildingsStatusID).Select(x => x.Name).FirstOrDefault();
  119. }
  120. }
  121. /// <summary>
  122. /// 建筑层数
  123. /// </summary>
  124. [DisplayName("建筑层数")]
  125. public decimal? BuildingsLevel { get; set; }
  126. /// <summary>
  127. /// 建筑层数(Excel导入)
  128. /// </summary>
  129. [DisplayName("建筑层数")]
  130. public string BuildingsLevelStr { get; set; }
  131. /// <summary>
  132. /// 建筑面积
  133. /// </summary>
  134. [DisplayName("建筑面积")]
  135. public decimal? BuildingsArea { get; set; }
  136. /// <summary>
  137. /// 建筑面积(Excel导入)
  138. /// </summary>
  139. [DisplayName("建筑面积")]
  140. public string BuildingsAreaStr { get; set; }
  141. /// <summary>
  142. /// 使用面积
  143. /// </summary>
  144. [DisplayName("使用面积")]
  145. public decimal? UseArea { get; set; }
  146. /// <summary>
  147. /// 使用面积(Excel导入)
  148. /// </summary>
  149. [DisplayName("使用面积")]
  150. public string UseAreaStr { get; set; }
  151. /// <summary>
  152. /// 地址
  153. /// </summary>
  154. [DisplayName("地址")]
  155. public string Position { get; set; }
  156. /// <summary>
  157. /// 是否可用
  158. /// </summary>
  159. [DisplayName("是否可用")]
  160. public bool IsSpecial { get; set; }
  161. /// <summary>
  162. /// 是否可用(Excel导入)
  163. /// </summary>
  164. [DisplayName("是否可用")]
  165. public string IsSpecialStr { get; set; }
  166. /// <summary>
  167. /// 是否可用
  168. /// </summary>
  169. [DisplayName("是否可用")]
  170. public string IsSpecialName
  171. {
  172. get
  173. {
  174. return IsSpecial == true ? "是" : "否";
  175. }
  176. }
  177. /// <summary>
  178. /// 教室间数
  179. /// </summary>
  180. [DisplayName("教室间数")]
  181. public int? ClassroomCount { get; set; }
  182. /// <summary>
  183. /// 备注
  184. /// </summary>
  185. [DisplayName("备注")]
  186. public string Remark { get; set; }
  187. /// <summary>
  188. /// 错误信息(Excel导入)
  189. /// </summary>
  190. [DisplayName("未导入原因")]
  191. public string ErrorMessage { get; set; }
  192. /// <summary>
  193. /// 状态
  194. /// </summary>
  195. [DisplayName("状态")]
  196. public int? RecordStatus { get; set; }
  197. /// <summary>
  198. /// 创建人
  199. /// </summary>
  200. [DisplayName("创建人")]
  201. public Guid? CreateUserID { get; set; }
  202. /// <summary>
  203. /// 创建时间
  204. /// </summary>
  205. [DisplayName("创建时间")]
  206. public DateTime? CreateTime { get; set; }
  207. /// <summary>
  208. /// 修改人
  209. /// </summary>
  210. [DisplayName("修改人")]
  211. public Guid? ModifyUserID { get; set; }
  212. /// <summary>
  213. /// 修改时间
  214. /// </summary>
  215. [DisplayName("修改时间")]
  216. public DateTime? ModifyTime { get; set; }
  217. }
  218. }