SOCView.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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.DQPSystem
  9. {
  10. public class SOCView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid SOCID { get; set; }
  17. public Guid? EducationMissionID { get; set; }
  18. public string EducationMissionName { get; set; }
  19. /// <summary>
  20. /// 学年学期ID
  21. /// </summary>
  22. [DisplayName("学年学期ID")]
  23. public Guid? SchoolyearID { get; set; }
  24. /// <summary>
  25. /// 学年学期
  26. /// </summary>
  27. [DisplayName("学年学期")]
  28. public string SchoolyearCode { get; set; }
  29. /// <summary>
  30. /// 课程资料
  31. /// </summary>
  32. [Required]
  33. [DisplayName("课程资料")]
  34. public Guid? CoursematerialID { get; set; }
  35. /// <summary>
  36. /// 课程资料代码
  37. /// </summary>
  38. [DisplayName("课程资料代码")]
  39. public string CourseCode { get; set; }
  40. /// <summary>
  41. /// 课程名称
  42. /// </summary>
  43. [DisplayName("课程名称")]
  44. public string CourseName { get; set; }
  45. /// <summary>
  46. /// 教研室
  47. /// </summary>
  48. [Required]
  49. [DisplayName("教研室")]
  50. public Guid? DepartmentID { get; set; }
  51. /// <summary>
  52. /// 教研室代码
  53. /// </summary>
  54. [DisplayName("教研室代码")]
  55. public string DepartmentCode { get; set; }
  56. /// <summary>
  57. /// 教研室
  58. /// </summary>
  59. [DisplayName("教研室")]
  60. public string DepartmentName { get; set; }
  61. /// <summary>
  62. /// 学分
  63. /// </summary>
  64. [Required]
  65. [DisplayName("学分")]
  66. //[DisplayFormat(DataFormatString = "{0:#.0}")]
  67. //[RegularExpression(@"^\d+(\.\d{1,1})?$", ErrorMessage = "请输整数或保留1位小数")]
  68. public decimal? Credit { get; set; }
  69. /// <summary>
  70. /// 课程学分
  71. /// </summary>
  72. [DisplayName("学分")]
  73. public string CreditStr { get; set; }
  74. /// <summary>
  75. /// 学生人数
  76. /// </summary>
  77. [DisplayName("学生人数")]
  78. public int? StudentCount { get; set; }
  79. /// <summary>
  80. /// SOC设置
  81. /// </summary>
  82. [DisplayName("SOC设置")]
  83. public string SOCSetting
  84. {
  85. get
  86. {
  87. return "查看";
  88. }
  89. }
  90. /// <summary>
  91. /// 处理方式
  92. /// </summary>
  93. [DisplayName("处理方式")]
  94. public int? HandleModeID { get; set; }
  95. /// <summary>
  96. /// 处理方式
  97. /// </summary>
  98. [DisplayName("处理方式")]
  99. public string HandleModeName
  100. {
  101. get
  102. {
  103. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HandleMode.ToString())
  104. .Where(x => x.Value == HandleModeID)
  105. .Select(x => x.Name).FirstOrDefault();
  106. }
  107. }
  108. /// <summary>
  109. /// 选修类型
  110. /// </summary>
  111. public int? OptionalCourseTypeID { get; set; }
  112. public string EducationMissionNameStr
  113. {
  114. get
  115. {
  116. return (EducationMissionName == null || EducationMissionName == "") ? "" : EducationMissionName.Replace(CourseName, "").Replace("-", "");
  117. }
  118. }
  119. }
  120. }