GraduateDesignCourseView.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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.GraduationManage.GraduationRequirement
  9. {
  10. public class GraduateDesignCourseView
  11. {
  12. /// <summary>
  13. /// 毕业设计课程ID
  14. /// </summary>
  15. [DisplayName("毕业设计课程ID")]
  16. public Guid GraduateDesignCoursematerialID { get; set; }
  17. /// <summary>
  18. /// 课程信息ID
  19. /// </summary>
  20. [Required]
  21. [DisplayName("课程信息ID")]
  22. public Guid? CoursematerialID { get; set; }
  23. /// <summary>
  24. /// 课程代码
  25. /// </summary>
  26. [DisplayName("课程代码")]
  27. public string CourseCode { get; set; }
  28. /// <summary>
  29. /// 课程名称
  30. /// </summary>
  31. [DisplayName("课程名称")]
  32. public string CourseName { get; set; }
  33. /// <summary>
  34. /// 课程类型
  35. /// </summary>
  36. [Required]
  37. [DisplayName("课程类型")]
  38. public int? CourseTypeID { get; set; }
  39. /// <summary>
  40. /// 课程类型
  41. /// </summary>
  42. [DisplayName("课程类型")]
  43. public string CourseTypeName
  44. {
  45. get
  46. {
  47. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseType.ToString())
  48. .Where(x => x.Value == CourseTypeID)
  49. .Select(x => x.Name).FirstOrDefault();
  50. }
  51. }
  52. /// <summary>
  53. /// 课程学分
  54. /// </summary>
  55. [Required]
  56. [DisplayName("课程学分")]
  57. [DisplayFormat(DataFormatString = "{0:N1}")]
  58. [RegularExpression(@"^\d+(\.\d{1,1})?$", ErrorMessage = "请输整数或保留1位小数")]
  59. public decimal? CourseCredit { get; set; }
  60. /// <summary>
  61. /// 成绩类型
  62. /// </summary>
  63. [Required]
  64. [DisplayName("成绩类型")]
  65. public int? ResultTypeID { get; set; }
  66. /// <summary>
  67. /// 成绩类型
  68. /// </summary>
  69. [DisplayName("成绩类型")]
  70. public string ResultTypeName
  71. {
  72. get
  73. {
  74. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ResultType.ToString())
  75. .Where(x => x.Value == ResultTypeID)
  76. .Select(x => x.Name).FirstOrDefault();
  77. }
  78. }
  79. /// <summary>
  80. /// 状态
  81. /// </summary>
  82. [DisplayName("状态")]
  83. public int? RecordStatus { get; set; }
  84. /// <summary>
  85. /// 创建人
  86. /// </summary>
  87. [DisplayName("创建人")]
  88. public Guid? CreateUserID { get; set; }
  89. /// <summary>
  90. /// 创建时间
  91. /// </summary>
  92. [DisplayName("创建时间")]
  93. public DateTime? CreateTime { get; set; }
  94. /// <summary>
  95. /// 修改人
  96. /// </summary>
  97. [DisplayName("修改人")]
  98. public Guid? ModifyUserID { get; set; }
  99. /// <summary>
  100. /// 修改时间
  101. /// </summary>
  102. [DisplayName("修改时间")]
  103. public DateTime? ModifyTime { get; set; }
  104. }
  105. }