EducationMissionOpenControlView.cs 4.5 KB

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