CollegePriorityView.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel;
  6. using System.ComponentModel.DataAnnotations;
  7. using EMIS.ViewModel.CacheManage;
  8. namespace EMIS.ViewModel.SchedulingManage
  9. {
  10. public class CollegePriorityView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid CollegePriorityID { get; set; }
  17. /// <summary>
  18. /// 院系所ID
  19. /// </summary>
  20. [Required]
  21. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  22. public Guid? CollegeID { get; set; }
  23. /// <summary>
  24. /// 院系所代码
  25. /// </summary>
  26. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
  27. public string CollegeNo { get; set; }
  28. /// <summary>
  29. /// 院系所
  30. /// </summary>
  31. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  32. public string CollegeName { get; set; }
  33. /// <summary>
  34. /// 单位类别
  35. /// </summary>
  36. [DisplayName("单位类别")]
  37. public int? UnitCategoryID { get; set; }
  38. /// <summary>
  39. /// 单位类别
  40. /// </summary>
  41. [DisplayName("单位类别")]
  42. public string UnitCategoryName
  43. {
  44. get
  45. {
  46. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_UnitCategory.ToString())
  47. .Where(x => x.Value == UnitCategoryID)
  48. .Select(x => x.Name).FirstOrDefault();
  49. }
  50. }
  51. /// <summary>
  52. /// 校区ID
  53. /// </summary>
  54. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")]
  55. public Guid? CampusID { get; set; }
  56. /// <summary>
  57. /// 校区代码
  58. /// </summary>
  59. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")]
  60. public string CampusNo { get; set; }
  61. /// <summary>
  62. /// 校区
  63. /// </summary>
  64. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")]
  65. public string CampusName { get; set; }
  66. /// <summary>
  67. /// 优先级
  68. /// </summary>
  69. [Required]
  70. [DisplayName("优先级")]
  71. public int? Priority { get; set; }
  72. /// <summary>
  73. /// 开始日期
  74. /// </summary>
  75. [Required]
  76. [DisplayName("开始日期")]
  77. public DateTime? StartDate { get; set; }
  78. /// <summary>
  79. /// 结束日期
  80. /// </summary>
  81. [Required]
  82. [DisplayName("结束日期")]
  83. public DateTime? EndDate { get; set; }
  84. /// <summary>
  85. /// 开放天数
  86. /// </summary>
  87. [DisplayName("开放天数")]
  88. public int? OpenDays
  89. {
  90. get
  91. {
  92. if (StartDate == null || EndDate == null)
  93. {
  94. return null;
  95. }
  96. else
  97. {
  98. return EndDate.Value.Subtract(StartDate.Value).Days;
  99. }
  100. }
  101. }
  102. /// <summary>
  103. /// 状态
  104. /// </summary>
  105. [DisplayName("状态")]
  106. public int? RecordStatus { get; set; }
  107. /// <summary>
  108. /// 创建人
  109. /// </summary>
  110. [DisplayName("创建人")]
  111. public Guid? CreateUserID { get; set; }
  112. /// <summary>
  113. /// 创建人
  114. /// </summary>
  115. [DisplayName("创建人")]
  116. public string CreateUserName { get; set; }
  117. /// <summary>
  118. /// 创建时间
  119. /// </summary>
  120. [DisplayName("创建时间")]
  121. public DateTime? CreateTime { get; set; }
  122. /// <summary>
  123. /// 修改人
  124. /// </summary>
  125. [DisplayName("修改人")]
  126. public Guid? ModifyUserID { get; set; }
  127. /// <summary>
  128. /// 修改时间
  129. /// </summary>
  130. [DisplayName("修改时间")]
  131. public DateTime? ModifyTime { get; set; }
  132. }
  133. }