ClassroomView.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  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 ClassroomView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid? ClassroomID { get; set; }
  17. /// <summary>
  18. /// 教室编号
  19. /// </summary>
  20. [Required]
  21. [DisplayName("教室编号")]
  22. public string Code { get; set; }
  23. /// <summary>
  24. /// 教室名称
  25. /// </summary>
  26. [Required]
  27. [DisplayName("教室名称")]
  28. public string Name { get; set; }
  29. /// <summary>
  30. /// 建筑名称
  31. /// </summary>
  32. [Required]
  33. [DisplayName("建筑名称")]
  34. public Guid? BuildingsInfoID { get; set; }
  35. /// <summary>
  36. /// 建筑编号
  37. /// </summary>
  38. [DisplayName("建筑编号")]
  39. public string BuildingsInfoCode { get; set; }
  40. /// <summary>
  41. /// 建筑名称
  42. /// </summary>
  43. [DisplayName("建筑名称")]
  44. public string BuildingsInfoName { get; set; }
  45. /// <summary>
  46. /// 校区ID(此为教室信息中的建筑信息对应的校区ID)
  47. /// </summary>
  48. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")]
  49. public Guid? CampusID { get; set; }
  50. /// <summary>
  51. /// 校区代码(此为教室信息中的建筑信息对应的校区代码)
  52. /// </summary>
  53. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  54. public string CampusCode { get; set; }
  55. /// <summary>
  56. /// 校区名称(此为教室信息中的建筑信息对应的校区)
  57. /// </summary>
  58. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  59. public string CampusName { get; set; }
  60. /// <summary>
  61. /// 院系所ID(此为教室信息所属的院系所ID)
  62. /// </summary>
  63. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  64. public Guid? CollegeID { get; set; }
  65. /// <summary>
  66. /// 院系所代码(此为教室信息所属的院系所代码)
  67. /// </summary>
  68. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  69. public string CollegeCode { get; set; }
  70. /// <summary>
  71. /// 院系所(此为教室信息所属的院系所)
  72. /// </summary>
  73. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeName")]
  74. public string CollegeName { get; set; }
  75. /// <summary>
  76. /// 单位类别
  77. /// </summary>
  78. [DisplayName("单位类别")]
  79. public int? UnitCategoryID { get; set; }
  80. /// <summary>
  81. /// 单位类别
  82. /// </summary>
  83. [DisplayName("单位类别")]
  84. public string UnitCategoryName
  85. {
  86. get
  87. {
  88. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_UnitCategory.ToString()).Where(x => x.Value == UnitCategoryID).Select(x => x.Name).FirstOrDefault();
  89. }
  90. }
  91. /// <summary>
  92. /// 校区ID(此为教室信息所属的院系所对应的校区ID)
  93. /// </summary>
  94. [Required]
  95. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
  96. public Guid? CollegeCampusID { get; set; }
  97. /// <summary>
  98. /// 校区代码(此为教室信息所属的院系所对应的校区代码)
  99. /// </summary>
  100. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  101. public string CollegeCampusCode { get; set; }
  102. /// <summary>
  103. /// 校区(此为教室信息所属的院系所对应的校区)
  104. /// </summary>
  105. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  106. public string CollegeCampusName { get; set; }
  107. /// <summary>
  108. /// 教室类型CF_ClassroomType
  109. /// </summary>
  110. [DisplayName("教室类型")]
  111. public IEnumerable<EMIS.Entities.CF_ClassroomType> CF_ClassroomType { get; set; }
  112. /// <summary>
  113. /// 教室类型List
  114. /// </summary>
  115. [DisplayName("教室类型")]
  116. public List<int> ClassroomTypeID { get; set; }
  117. /// <summary>
  118. /// 教室类型List
  119. /// </summary>
  120. [DisplayName("教室类型")]
  121. public List<int?> ClassroomTypeIDList { get; set; }
  122. /// <summary>
  123. /// 教室类型List(Excel导入用,可存在多个教室类型--用顿号隔开)
  124. /// </summary>
  125. [DisplayName("教室类型")]
  126. public string ClassroomTypeIDListStr { get; set; }
  127. /// <summary>
  128. /// 教室类型(可存在多个教室类型--用顿号隔开)
  129. /// </summary>
  130. [DisplayName("教室类型")]
  131. public string ClassroomTypeName
  132. {
  133. get
  134. {
  135. if (CF_ClassroomType != null && CF_ClassroomType.Count() > 0)
  136. {
  137. return string.Join("、", CF_ClassroomType.Select(x =>
  138. IdNameExt.GetDictionaryItem(DictionaryItem.CF_ClassroomType.ToString()).Where(w => w.Value == x.ClassroomType).Select(w => w.Name).FirstOrDefault()));
  139. }
  140. else
  141. {
  142. return "";
  143. }
  144. }
  145. }
  146. /// <summary>
  147. /// 布局类型(暂时无效)
  148. /// </summary>
  149. [DisplayName("布局类型")]
  150. public Guid? LayoutTypeID { get; set; }
  151. /// <summary>
  152. /// 房间用途
  153. /// </summary>
  154. [DisplayName("房间用途")]
  155. public int? RoomUseID { get; set; }
  156. /// <summary>
  157. /// 房间用途(Excel导入用)
  158. /// </summary>
  159. [DisplayName("房间用途")]
  160. public string RoomUseStr { get; set; }
  161. /// <summary>
  162. /// 房间用途
  163. /// </summary>
  164. [DisplayName("房间用途")]
  165. public string RoomUseName
  166. {
  167. get
  168. {
  169. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_RoomUse.ToString()).Where(x => x.Value == RoomUseID).Select(x => x.Name).FirstOrDefault();
  170. }
  171. }
  172. /// <summary>
  173. /// 所在楼层
  174. /// </summary>
  175. [DisplayName("所在楼层")]
  176. [RegularExpression(@"^-?\d+$", ErrorMessage = "请输入整数")]
  177. public int? FloorLevel { get; set; }
  178. /// <summary>
  179. /// 所在楼层(Excel导入用)
  180. /// </summary>
  181. [DisplayName("所在楼层")]
  182. public string FloorLevelStr { get; set; }
  183. /// <summary>
  184. /// 面积
  185. /// </summary>
  186. [DisplayName("面积")]
  187. [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  188. public decimal? Acreage { get; set; }
  189. /// <summary>
  190. /// 面积(Excel导入用)
  191. /// </summary>
  192. [DisplayName("面积")]
  193. public string AcreageStr { get; set; }
  194. /// <summary>
  195. /// 行数
  196. /// </summary>
  197. [DisplayName("行数")]
  198. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  199. public int? RowCout { get; set; }
  200. /// <summary>
  201. /// 行数(Excel导入用)
  202. /// </summary>
  203. [DisplayName("行数")]
  204. public string RowCoutStr { get; set; }
  205. /// <summary>
  206. /// 列数
  207. /// </summary>
  208. [DisplayName("列数")]
  209. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  210. public int? ColumnCount { get; set; }
  211. /// <summary>
  212. /// 列数(Excel导入用)
  213. /// </summary>
  214. [DisplayName("列数")]
  215. public string ColumnCountStr { get; set; }
  216. /// <summary>
  217. /// 总座位数
  218. /// </summary>
  219. [DisplayName("总座位数")]
  220. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  221. public int? Totalseating { get; set; }
  222. /// <summary>
  223. /// 总座位数(Excel导入用)
  224. /// </summary>
  225. [DisplayName("总座位数")]
  226. public string TotalseatingStr { get; set; }
  227. /// <summary>
  228. /// 有效座位数
  229. /// </summary>
  230. [DisplayName("有效座位数")]
  231. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  232. public int? Effectiveseating { get; set; }
  233. /// <summary>
  234. /// 有效座位数(Excel导入用)
  235. /// </summary>
  236. [DisplayName("有效座位数")]
  237. public string EffectiveseatingStr { get; set; }
  238. /// <summary>
  239. /// 考试座位数
  240. /// </summary>
  241. [DisplayName("考试座位数")]
  242. [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
  243. public int? Examinationseating { get; set; }
  244. /// <summary>
  245. /// 考试座位数(Excel导入用)
  246. /// </summary>
  247. [DisplayName("考试座位数")]
  248. public string ExaminationseatingStr { get; set; }
  249. /// <summary>
  250. /// 可否笔试
  251. /// </summary>
  252. [DisplayName("可否笔试")]
  253. public bool IsWrittenExam { get; set; }
  254. /// <summary>
  255. /// 可否笔试(Excel导入用)
  256. /// </summary>
  257. [DisplayName("可否笔试")]
  258. public string IsWrittenExamStr { get; set; }
  259. /// <summary>
  260. /// 可否笔试
  261. /// </summary>
  262. [DisplayName("可否笔试")]
  263. public string IsWrittenExamName
  264. {
  265. get { return this.IsWrittenExam == true ? "是" : "否"; }
  266. }
  267. /// <summary>
  268. /// 可否机试
  269. /// </summary>
  270. [DisplayName("可否机试")]
  271. public bool IsMachinetest { get; set; }
  272. /// <summary>
  273. /// 可否机试(Excel导入用)
  274. /// </summary>
  275. [DisplayName("可否机试")]
  276. public string IsMachinetestStr { get; set; }
  277. /// <summary>
  278. /// 可否机试
  279. /// </summary>
  280. [DisplayName("可否机试")]
  281. public string IsMachinetestName
  282. {
  283. get { return this.IsMachinetest == true ? "是" : "否"; }
  284. }
  285. /// <summary>
  286. /// 可否多班教学
  287. /// </summary>
  288. [DisplayName("可否多班教学")]
  289. public bool IsConcurrentUse { get; set; }
  290. /// <summary>
  291. /// 可否多班教学(Excel导入用)
  292. /// </summary>
  293. [DisplayName("可否多班教学")]
  294. public string IsConcurrentUseStr { get; set; }
  295. /// <summary>
  296. /// 可否多班教学
  297. /// </summary>
  298. [DisplayName("可否多班教学")]
  299. public string IsConcurrentUseName
  300. {
  301. get { return this.IsConcurrentUse == true ? "是" : "否"; }
  302. }
  303. /// <summary>
  304. /// 是否预留(排课用)
  305. /// </summary>
  306. [DisplayName("是否预留")]
  307. public bool IsReserve { get; set; }
  308. /// <summary>
  309. /// 是否预留(排课用)
  310. /// </summary>
  311. [DisplayName("是否预留")]
  312. public string IsReserveName
  313. {
  314. get { return this.IsReserve == true ? "是" : "否"; }
  315. }
  316. /// <summary>
  317. /// 是否可用
  318. /// </summary>
  319. [DisplayName("是否可用")]
  320. public bool IsAvailable { get; set; }
  321. /// <summary>
  322. /// 是否可用(Excel导入用)
  323. /// </summary>
  324. [DisplayName("是否可用")]
  325. public string IsAvailableStr { get; set; }
  326. /// <summary>
  327. /// 是否可用
  328. /// </summary>
  329. [DisplayName("是否可用")]
  330. public string IsAvailableName
  331. {
  332. get { return this.IsAvailable == true ? "是" : "否"; }
  333. }
  334. /// <summary>
  335. /// 排课院系个数(统计排课分配的院系个数)
  336. /// </summary>
  337. [DisplayName("排课院系个数")]
  338. public int? ScheduleCollegeCount { get; set; }
  339. /// <summary>
  340. /// 备注
  341. /// </summary>
  342. [DisplayName("备注")]
  343. public string Remark { get; set; }
  344. /// <summary>
  345. /// 错误信息(Excel导入)
  346. /// </summary>
  347. [DisplayName("未导入原因")]
  348. public string ErrorMessage { get; set; }
  349. /// <summary>
  350. /// 状态
  351. /// </summary>
  352. [DisplayName("状态")]
  353. public int? RecordStatus { get; set; }
  354. /// <summary>
  355. /// 创建人
  356. /// </summary>
  357. [DisplayName("创建人")]
  358. public Guid? CreateUserID { get; set; }
  359. /// <summary>
  360. /// 创建时间
  361. /// </summary>
  362. [DisplayName("创建时间")]
  363. public DateTime? CreateTime { get; set; }
  364. /// <summary>
  365. /// 修改人
  366. /// </summary>
  367. [DisplayName("修改人")]
  368. public Guid? ModifyUserID { get; set; }
  369. /// <summary>
  370. /// 修改时间
  371. /// </summary>
  372. [DisplayName("修改时间")]
  373. public DateTime? ModifyTime { get; set; }
  374. }
  375. }