OptionalCourseSettingCreateView.cs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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.SelectCourse
  9. {
  10. public class OptionalCourseSettingCreateView
  11. {
  12. /// <summary>
  13. /// 学年学期ID
  14. /// </summary>
  15. [Required]
  16. [DisplayName("学年学期ID")]
  17. public Guid? SchoolyearID { get; set; }
  18. /// <summary>
  19. /// 学年学期
  20. /// </summary>
  21. [DisplayName("学年学期")]
  22. public string SchoolYearCode { get; set; }
  23. /// <summary>
  24. /// 校区ID
  25. /// </summary>
  26. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")]
  27. public Nullable<System.Guid> CampusID { get; set; }
  28. /// <summary>
  29. /// 院系所ID
  30. /// </summary>
  31. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  32. public Nullable<System.Guid> CollegeID { get; set; }
  33. /// <summary>
  34. /// 院系所
  35. /// </summary>
  36. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  37. public string CollegeName { get; set; }
  38. /// <summary>
  39. /// 年级专业
  40. /// </summary>
  41. [DisplayName("年级专业")]
  42. public Guid? GrademajorID { get; set; }
  43. /// <summary>
  44. /// 年级(年级专业对应的年级)
  45. /// </summary>
  46. [DisplayName("年级")]
  47. public int? GradeID { get; set; }
  48. /// <summary>
  49. /// 年级(年级专业对应的年级)
  50. /// </summary>
  51. [DisplayName("年级")]
  52. public string Grade
  53. {
  54. get
  55. {
  56. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Grade.ToString()).Where(x => x.Value == GradeID).Select(x => x.Name).FirstOrDefault();
  57. }
  58. }
  59. /// <summary>
  60. /// 学年
  61. /// </summary>
  62. [DisplayName("学年")]
  63. public int? Years { get; set; }
  64. /// <summary>
  65. /// 院系专业
  66. /// </summary>
  67. public int? StandardID { get; set; }
  68. /// <summary>
  69. /// 专业代码
  70. /// </summary>
  71. [DisplayName("专业代码")]
  72. public string StandardCode
  73. {
  74. get
  75. {
  76. var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  77. .Where(x => x.Value == StandardID)
  78. .Select(x => x.Code).FirstOrDefault();
  79. return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
  80. }
  81. }
  82. /// <summary>
  83. /// 专业名称
  84. /// </summary>
  85. [DisplayName("专业名称")]
  86. public string StandardDesc
  87. {
  88. get
  89. {
  90. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
  91. .Where(x => x.Value == StandardID)
  92. .Select(x => x.Name).FirstOrDefault();
  93. }
  94. }
  95. /// <summary>
  96. /// 课程名称
  97. /// </summary>
  98. [DisplayName("课程名称")]
  99. public string CourseName { get; set; }
  100. /// <summary>
  101. /// 课程信息ID
  102. /// </summary>
  103. public Guid? CoursematerialID { get; set; }
  104. /// <summary>
  105. /// 年级专业名称
  106. /// </summary>
  107. [DisplayName("年级专业名称")]
  108. public string GrademajorName { get; set; }
  109. }
  110. }