SOCTemplateView.cs 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.ViewModel.CultureplanManage;
  6. using System.ComponentModel;
  7. using System.ComponentModel.DataAnnotations;
  8. using EMIS.ViewModel.Cultureplan;
  9. using EMIS.ViewModel.CacheManage;
  10. using EMIS.ViewModel.UniversityManage.SpecialtyClassManage;
  11. namespace EMIS.ViewModel.DQPSystem
  12. {
  13. public class SOCTemplateView
  14. {
  15. /// <summary>
  16. /// 主键ID
  17. /// </summary>
  18. [DisplayName("主键ID")]
  19. public Guid SOCTemplateID { get; set; }
  20. /// <summary>
  21. /// 院系专业ID
  22. /// </summary>
  23. [DisplayName("院系专业ID")]
  24. public Guid? FacultymajorID { get; set; }
  25. /// <summary>
  26. /// 院系专业
  27. /// </summary>
  28. [DisplayName("院系专业")]
  29. public string FacultymajorName { get; set; }
  30. /// <summary>
  31. /// 专业ID(Value)
  32. /// </summary>
  33. //[Required]
  34. [DisplayName("专业ID(Value)")]
  35. public int? StandardID { get; set; }
  36. /// <summary>
  37. /// 专业代码
  38. /// </summary>
  39. [DisplayName("专业代码")]
  40. public string StandardCode
  41. {
  42. get
  43. {
  44. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  45. .Where(x => x.Value == StandardID)
  46. .Select(x => x.Code).FirstOrDefault();
  47. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  48. }
  49. }
  50. /// <summary>
  51. /// 专业名称
  52. /// </summary>
  53. [DisplayName("专业名称")]
  54. public string StandardName
  55. {
  56. get
  57. {
  58. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  59. .Where(x => x.Value == StandardID)
  60. .Select(x => x.Name).FirstOrDefault();
  61. }
  62. }
  63. /// <summary>
  64. /// 培养层次/学历
  65. /// </summary>
  66. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
  67. public int? EducationID { get; set; }
  68. /// <summary>
  69. /// 培养层次名称/学历
  70. /// </summary>
  71. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
  72. public string EducationName
  73. {
  74. get
  75. {
  76. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
  77. .Where(x => x.Value == EducationID)
  78. .Select(x => x.Name).FirstOrDefault();
  79. }
  80. }
  81. /// <summary>
  82. /// 学制
  83. /// </summary>
  84. //[Required]
  85. [DisplayName("学制")]
  86. //[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
  87. public decimal? LearnSystem { get; set; }
  88. /// <summary>
  89. /// 学习形式
  90. /// </summary>
  91. //[Required]
  92. [DisplayName("学习形式")]
  93. public int? LearningformID { get; set; }
  94. /// <summary>
  95. /// 学习形式
  96. /// </summary>
  97. [DisplayName("学习形式")]
  98. public string LearningformName
  99. {
  100. get
  101. {
  102. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
  103. .Where(x => x.Value == LearningformID)
  104. .Select(x => x.Name).FirstOrDefault();
  105. }
  106. }
  107. /// <summary>
  108. /// 课程资料
  109. /// </summary>
  110. [Required]
  111. [DisplayName("课程资料")]
  112. public Guid? CoursematerialID { get; set; }
  113. /// <summary>
  114. /// 课程资料代码
  115. /// </summary>
  116. [DisplayName("课程资料代码")]
  117. public string CourseCode { get; set; }
  118. /// <summary>
  119. /// 课程名称
  120. /// </summary>
  121. [DisplayName("课程名称")]
  122. public string CourseName { get; set; }
  123. /// <summary>
  124. /// 学分
  125. /// </summary>
  126. [Required]
  127. [DisplayName("学分")]
  128. //[DisplayFormat(DataFormatString = "{0:#.0}")]
  129. //[RegularExpression(@"^\d+(\.\d+)?$", ErrorMessage = "请输整数或小数")]
  130. public decimal? Credit { get; set; }
  131. /// <summary>
  132. /// 课程学分
  133. /// </summary>
  134. [DisplayName("学分")]
  135. public string CreditStr { get; set; }
  136. /// <summary>
  137. /// 开课学年
  138. /// </summary>
  139. //[Required]
  140. [DisplayName("开课学年")]
  141. public int? SchoolyearNumID { get; set; }
  142. [DisplayName("开课学年")]
  143. public string SchoolyearNumNameStr { get; set; }
  144. /// <summary>
  145. /// 开课学年
  146. /// </summary>
  147. [DisplayName("开课学年")]
  148. public string SchoolyearNumName
  149. {
  150. get
  151. {
  152. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString())
  153. .Where(x => x.Value == SchoolyearNumID)
  154. .Select(x => x.Name).FirstOrDefault();
  155. }
  156. }
  157. /// <summary>
  158. /// 学期
  159. /// </summary>
  160. //[Required]
  161. [DisplayName("学期")]
  162. public int? SchoolcodeID { get; set; }
  163. [DisplayName("学期")]
  164. public string SchoolcodeStr { get; set; }
  165. /// <summary>
  166. /// 学期
  167. /// </summary>
  168. [DisplayName("学期")]
  169. public string SchoolcodeName
  170. {
  171. get
  172. {
  173. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Semester.ToString()).Where(x => x.Value == SchoolcodeID).Select(x => x.Name).FirstOrDefault();
  174. }
  175. }
  176. /// <summary>
  177. /// 教研室
  178. /// </summary>
  179. [Required]
  180. [DisplayName("教研室")]
  181. public Guid? DepartmentID { get; set; }
  182. /// <summary>
  183. /// 教研室代码
  184. /// </summary>
  185. [DisplayName("教研室代码")]
  186. public string DepartmentCode { get; set; }
  187. /// <summary>
  188. /// 教研室
  189. /// </summary>
  190. [DisplayName("教研室")]
  191. public string DepartmentName { get; set; }
  192. /// <summary>
  193. /// 是否启用
  194. /// </summary>
  195. [DisplayName("是否启用")]
  196. public bool IsEnable { get; set; }
  197. /// <summary>
  198. /// 是否启用
  199. /// </summary>
  200. [DisplayName("是否启用")]
  201. public string IsEnableName { get; set; }
  202. /// <summary>
  203. /// 状态
  204. /// </summary>
  205. [DisplayName("状态")]
  206. public int? RecordStatus { get; set; }
  207. public string RecordStatusStr {
  208. get {
  209. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_YesOrNoStatus.ToString())
  210. .Where(x => x.Value == RecordStatus)
  211. .Select(x => x.Name).FirstOrDefault();
  212. }
  213. }
  214. /// <summary>
  215. /// SOC个数
  216. /// </summary>
  217. [DisplayName("SOC个数")]
  218. public int? SOCCount { get; set; }
  219. /// <summary>
  220. /// 处理方式
  221. /// </summary>
  222. [DisplayName("处理方式")]
  223. public int? HandleModeID { get; set; }
  224. /// <summary>
  225. /// 处理方式
  226. /// </summary>
  227. [DisplayName("处理方式")]
  228. public string HandleModeName
  229. {
  230. get
  231. {
  232. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HandleMode.ToString())
  233. .Where(x => x.Value == HandleModeID)
  234. .Select(x => x.Name).FirstOrDefault();
  235. }
  236. }
  237. /// <summary>
  238. /// 选修类型
  239. /// </summary>
  240. public int? OptionalCourseTypeID { get; set; }
  241. }
  242. }