MinorClassView.cs 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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.Entities;
  8. using EMIS.ViewModel.CacheManage;
  9. namespace EMIS.ViewModel.MinorManage.MinorClass
  10. {
  11. public class MinorClassView
  12. {
  13. /// <summary>
  14. /// 辅修班级ID
  15. /// </summary>
  16. [DisplayName("辅修班级ID")]
  17. public Guid ClassminorID { get; set; }
  18. /// <summary>
  19. /// 辅修专业ID
  20. /// </summary>
  21. [Required]
  22. [DisplayName("辅修专业ID")]
  23. public Guid? GrademinorID { get; set; }
  24. /// <summary>
  25. /// 班级名称
  26. /// </summary>
  27. [Required]
  28. [DisplayName("辅修班级")]
  29. public string Name { get; set; }
  30. /// <summary>
  31. /// 班级简称
  32. /// </summary>
  33. [DisplayName("班级简称")]
  34. public string ClassAbbreviation { get; set; }
  35. /// <summary>
  36. /// 班序
  37. /// </summary>
  38. [DisplayName("班序")]
  39. public int? ClassNum { get; set; }
  40. /// <summary>
  41. /// 学年学期ID
  42. /// </summary>
  43. [DisplayName("学年学期")]
  44. public Guid? SchoolyearID { get; set; }
  45. /// <summary>
  46. /// 学年学期
  47. /// </summary>
  48. [DisplayName("学年学期")]
  49. public string SchoolyearCode { get; set; }
  50. /// <summary>
  51. /// 年级
  52. /// </summary>
  53. [DisplayName("年级")]
  54. public int? GradeYearID { get; set; }
  55. /// <summary>
  56. /// 年级
  57. /// </summary>
  58. [DisplayName("年级")]
  59. public string Grade
  60. {
  61. get
  62. {
  63. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Grade.ToString()).Where(x => x.Value == GradeYearID).Select(x => x.Name).FirstOrDefault();
  64. }
  65. }
  66. /// <summary>
  67. /// 专业代码(对应字典中的Value)
  68. /// </summary>
  69. public int? StandardID { get; set; }
  70. /// <summary>
  71. /// 专业代码
  72. /// </summary>
  73. [DisplayName("专业代码")]
  74. public string StandardCode
  75. {
  76. get
  77. {
  78. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  79. .Where(x => x.Value == StandardID)
  80. .Select(x => x.Code).FirstOrDefault();
  81. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  82. }
  83. }
  84. /// <summary>
  85. /// 专业名称
  86. /// </summary>
  87. [DisplayName("专业名称")]
  88. public string StandardName
  89. {
  90. get
  91. {
  92. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  93. .Where(x => x.Value == StandardID)
  94. .Select(x => x.Name).FirstOrDefault();
  95. }
  96. }
  97. /// <summary>
  98. /// 院系所ID
  99. /// </summary>
  100. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  101. public Guid? CollegeID { get; set; }
  102. /// <summary>
  103. /// 院系所编号
  104. /// </summary>
  105. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  106. public string CollegeNo { get; set; }
  107. /// <summary>
  108. /// 开设院系
  109. /// </summary>
  110. [DisplayName("开设院系")]
  111. public string CollegeName { get; set; }
  112. /// <summary>
  113. /// 学生人数
  114. /// </summary>
  115. [DisplayName("人数")]
  116. public int? StudentNum { get; set; }
  117. /// <summary>
  118. /// 学生集合
  119. /// </summary>
  120. [DisplayName("学生集合")]
  121. public HashSet<CF_ClassminorStudent> CF_ClassminorStudent { get; set; }
  122. /// <summary>
  123. /// 状态
  124. /// </summary>
  125. [DisplayName("状态")]
  126. public int? RecordStatus { get; set; }
  127. /// <summary>
  128. /// 状态
  129. /// </summary>
  130. [DisplayName("状态")]
  131. public string RecordStatusStr
  132. {
  133. get
  134. {
  135. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ClassminorStatus.ToString())
  136. .Where(x => x.Value == RecordStatus)
  137. .Select(x => x.Name).FirstOrDefault();
  138. }
  139. }
  140. }
  141. }