EvaluationIntTypeView.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Linq;
  6. using System.Text;
  7. using EMIS.ViewModel.CacheManage;
  8. namespace EMIS.ViewModel.EvaluationManage.EvaluationSetting
  9. {
  10. public class EvaluationIntTypeView
  11. {
  12. /// <summary>
  13. /// 主键ID
  14. /// </summary>
  15. [DisplayName("主键ID")]
  16. public Guid EvaluationIntTypeID { get; set; }
  17. /// <summary>
  18. /// 编号
  19. /// </summary>
  20. [Required]
  21. [DisplayName("编号")]
  22. [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入数字或英文字母")]
  23. public string Code { 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 List<int?> TeachingModeIDList { get; set; }
  35. /// <summary>
  36. /// 授课方式(可存在多个授课方式--用顿号隔开)
  37. /// </summary>
  38. [DisplayName("授课方式")]
  39. public string TeachingModeIDListName
  40. {
  41. get
  42. {
  43. if (TeachingModeIDList != null && TeachingModeIDList.Count() > 0)
  44. {
  45. return string.Join("、", TeachingModeIDList.Select(x => IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString()).Where(w => w.Value == x).Select(w => w.Name).FirstOrDefault()));
  46. }
  47. else
  48. {
  49. return "";
  50. }
  51. }
  52. }
  53. /// <summary>
  54. /// 备注
  55. /// </summary>
  56. [DisplayName("备注")]
  57. public string Remark { get; set; }
  58. /// <summary>
  59. /// 状态
  60. /// </summary>
  61. [DisplayName("状态")]
  62. public int? RecordStatus { get; set; }
  63. /// <summary>
  64. /// 创建人
  65. /// </summary>
  66. [DisplayName("创建人")]
  67. public Guid? CreateUserID { get; set; }
  68. /// <summary>
  69. /// 创建人
  70. /// </summary>
  71. [DisplayName("创建人")]
  72. public string CreateUserName { get; set; }
  73. /// <summary>
  74. /// 创建时间
  75. /// </summary>
  76. [DisplayName("创建时间")]
  77. public DateTime? CreateTime { get; set; }
  78. /// <summary>
  79. /// 修改人
  80. /// </summary>
  81. [DisplayName("修改人")]
  82. public Guid? ModifyUserID { get; set; }
  83. /// <summary>
  84. /// 修改人
  85. /// </summary>
  86. [DisplayName("修改人")]
  87. public string ModifyUserName { get; set; }
  88. /// <summary>
  89. /// 修改时间
  90. /// </summary>
  91. [DisplayName("修改时间")]
  92. public DateTime? ModifyTime { get; set; }
  93. }
  94. }