GrademinorView.cs 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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.MinorManage.MinorApply
  9. {
  10. public class GrademinorView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. public Guid GrademinorID { get; set; }
  16. /// <summary>
  17. /// 辅修专业申请ID
  18. /// </summary>
  19. [DisplayName("辅修专业申请ID")]
  20. public Guid? GradeMinorApplicationID { get; set; }
  21. /// <summary>
  22. /// 年级
  23. /// </summary>
  24. [DisplayName("年级")]
  25. public int? YearID { get; set; }
  26. /// <summary>
  27. /// 专业代码
  28. /// </summary>
  29. [DisplayName("专业代码")]
  30. public int? StandardID { get; set; }
  31. /// <summary>
  32. /// 专业代码
  33. /// </summary>
  34. [DisplayName("专业代码")]
  35. public string StandardCode
  36. {
  37. get
  38. {
  39. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  40. .Where(x => x.Value == StandardID)
  41. .Select(x => x.Code).FirstOrDefault();
  42. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  43. }
  44. }
  45. /// <summary>
  46. /// 专业名称
  47. /// </summary>
  48. [DisplayName("专业名称")]
  49. public string StandardName
  50. {
  51. get
  52. {
  53. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  54. .Where(x => x.Value == StandardID)
  55. .Select(x => x.Name).FirstOrDefault();
  56. }
  57. }
  58. public string LookCoursematerial {
  59. get {
  60. return "查看课程";
  61. }
  62. }
  63. /// <summary>
  64. /// 院系所
  65. /// </summary>
  66. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  67. public Guid? CollegeID { get; set; }
  68. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  69. public string CollegeNo { get; set; }
  70. /// <summary>
  71. /// 院系所
  72. /// </summary>
  73. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  74. public string CollegeName { get; set; }
  75. /// <summary>
  76. /// 学年学期ID
  77. /// </summary>
  78. [DisplayName("学年学期")]
  79. public Guid? SchoolyearID { get; set; }
  80. public string SchoolyearCode { get; set; }
  81. /// <summary>
  82. /// 人数上限
  83. /// </summary>
  84. [DisplayName("人数上限")]
  85. public int? StudentLimit { get; set; }
  86. /// <summary>
  87. /// 辅修专业状态
  88. /// </summary>
  89. [DisplayName("辅修专业状态")]
  90. public int? OpenStatus { get; set; }
  91. /// <summary>
  92. /// 辅修专业状态
  93. /// </summary>
  94. [DisplayName("辅修专业状态")]
  95. public string OpenStatusStr
  96. {
  97. get
  98. {
  99. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_GrademinorStatus.ToString())
  100. .Where(x => x.Value == OpenStatus)
  101. .Select(x => x.Name).FirstOrDefault();
  102. }
  103. }
  104. /// <summary>
  105. /// 备注
  106. /// </summary>
  107. [DisplayName("备注")]
  108. public string Remarks { get; set; }
  109. /// <summary>
  110. /// 创建人
  111. /// </summary>
  112. [DisplayName("创建人")]
  113. public Guid? CreateUserID { get; set; }
  114. /// <summary>
  115. /// 创建人姓名
  116. /// </summary>
  117. [DisplayName("创建人姓名")]
  118. public string CreateUserName { get; set; }
  119. /// <summary>
  120. /// 创建时间
  121. /// </summary>
  122. [DisplayName("创建时间")]
  123. public DateTime? CreateTime { get; set; }
  124. /// <summary>
  125. /// 已报人数
  126. /// </summary>
  127. [DisplayName("已报人数")]
  128. public int? ApplyNumber { get; set; }
  129. /// <summary>
  130. /// 辅修控制信息ID
  131. /// </summary>
  132. [DisplayName("辅修控制信息ID")]
  133. public Guid? MinorControlID { get; set; }
  134. /// <summary>
  135. /// 开始时间
  136. /// </summary>
  137. [DisplayName("开始时间")]
  138. public DateTime? StartDate { get; set; }
  139. /// <summary>
  140. /// 结束时间
  141. /// </summary>
  142. [DisplayName("结束时间")]
  143. public DateTime? EndDate { get; set; }
  144. /// <summary>
  145. /// 报名状态
  146. /// </summary>
  147. [DisplayName("报名状态")]
  148. public bool? ApplyStatus { get; set; }
  149. /// <summary>
  150. /// 报名状态
  151. /// </summary>
  152. [DisplayName("报名状态")]
  153. public string ApplyStatusName
  154. {
  155. get
  156. {
  157. return ApplyStatus == true ? "是" : "否";
  158. }
  159. }
  160. /// <summary>
  161. /// 修读门数
  162. /// </summary>
  163. [DisplayName("修读门数")]
  164. public int? CourseCount { get; set; }
  165. /// <summary>
  166. /// 操作状态
  167. /// </summary>
  168. [DisplayName("操作状态")]
  169. public bool? CanSelect { get; set; }
  170. /// <summary>
  171. /// 操作状态
  172. /// </summary>
  173. public string OperateText
  174. {
  175. get
  176. {
  177. if (ApplyStatus.Value)
  178. {
  179. return "已报名";
  180. }
  181. if (ApplyNumber != null && StudentLimit != 0 && ApplyNumber.Value >= StudentLimit.Value)
  182. {
  183. return "已报满";
  184. }
  185. return "立即报名";
  186. }
  187. }
  188. /// <summary>
  189. /// 学生报名审核状态
  190. /// </summary>
  191. [DisplayName("学生报名审核状态")]
  192. public int? RecordStatus { get; set; }
  193. /// <summary>
  194. /// 审核状态
  195. /// </summary>
  196. [DisplayName("审核状态")]
  197. public string RecordStatusStr { get; set; }
  198. ///// <summary>
  199. ///// 辅修专业状态
  200. ///// </summary>
  201. //[DisplayName("辅修专业状态")]
  202. //public int? GrademinorRecordStatus { get; set; }
  203. ///// <summary>
  204. ///// 辅修专业状态
  205. ///// </summary>
  206. //[DisplayName("辅修专业状态")]
  207. //public string GrademinorRecordStatusStr { get; set; }
  208. }
  209. }