MinorSpecialtyView.cs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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.MinorManage.MinorPlanManage
  9. {
  10. public class MinorSpecialtyView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. public Guid GrademinorID { get; set; }
  16. public Guid? GradeMinorApplicationID { get; set; }
  17. /// <summary>
  18. /// 年级
  19. /// </summary>
  20. [Required]
  21. [DisplayName("年级")]
  22. public int? YearID { get; set; }
  23. /// <summary>
  24. /// 专业代码
  25. /// </summary>
  26. [Required]
  27. [DisplayName("专业代码")]
  28. public int? StandardID { get; set; }
  29. /// <summary>
  30. /// 专业代码
  31. /// </summary>
  32. [DisplayName("专业代码")]
  33. public string StandardCode
  34. {
  35. get
  36. {
  37. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  38. .Where(x => x.Value == StandardID)
  39. .Select(x => x.Code).FirstOrDefault();
  40. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  41. }
  42. }
  43. /// <summary>
  44. /// 专业名称
  45. /// </summary>
  46. [DisplayName("专业名称")]
  47. public string StandardName
  48. {
  49. get
  50. {
  51. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  52. .Where(x => x.Value == StandardID)
  53. .Select(x => x.Name).FirstOrDefault();
  54. }
  55. }
  56. /// <summary>
  57. /// 院系所
  58. /// </summary>
  59. [Required]
  60. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  61. public Guid? CollegeID { get; set; }
  62. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  63. public string CollegeNo { get; set; }
  64. /// <summary>
  65. /// 院系所
  66. /// </summary>
  67. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  68. public string CollegeName { get; set; }
  69. /// <summary>
  70. /// 学年学期ID
  71. /// </summary>
  72. [DisplayName("学年学期")]
  73. public Guid? SchoolyearID { get; set; }
  74. public string SchoolyearCode { get; set; }
  75. /// <summary>
  76. /// 人数上限
  77. /// </summary>
  78. [DisplayName("人数上限")]
  79. public int? StudentLimit { get; set; }
  80. /// <summary>
  81. /// 已报名人数
  82. /// </summary>
  83. [DisplayName("已报名人数")]
  84. public int? StudentCount { get; set; }
  85. /// <summary>
  86. /// 开放状态
  87. /// </summary>
  88. [DisplayName("开放状态")]
  89. public int? OpenStatus { get; set; }
  90. /// <summary>
  91. /// 开放状态
  92. /// </summary>
  93. [DisplayName("开放状态")]
  94. public string OpenStatusStr
  95. {
  96. get
  97. {
  98. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_GrademinorStatus.ToString())
  99. .Where(x => x.Value == OpenStatus)
  100. .Select(x => x.Name).FirstOrDefault();
  101. }
  102. }
  103. /// <summary>
  104. /// 备注
  105. /// </summary>
  106. [DisplayName("备注")]
  107. public string Remarks { get; set; }
  108. /// <summary>
  109. /// 创建人
  110. /// </summary>
  111. [DisplayName("创建人")]
  112. public Guid? CreateUserID { get; set; }
  113. /// <summary>
  114. /// 创建人姓名
  115. /// </summary>
  116. [DisplayName("创建人姓名")]
  117. public string CreateUserName { get; set; }
  118. /// <summary>
  119. /// 创建时间
  120. /// </summary>
  121. [DisplayName("创建时间")]
  122. public DateTime? CreateTime { get; set; }
  123. }
  124. }