EvaluationIntTypeView.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. using Bowin.Common.Exceptions;
  2. using EMIS.Entities;
  3. using EMIS.ViewModel.CacheManage;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.ComponentModel.DataAnnotations;
  8. using System.Linq;
  9. using System.Text;
  10. namespace EMIS.ViewModel.EvaluationManage
  11. {
  12. public class EvaluationIntTypeView
  13. {
  14. /// <summary>
  15. /// 评价类型
  16. /// </summary>
  17. [DisplayName("评价类型ID")]
  18. public Guid? EvaluationIntTypeID { get; set; }
  19. /// <summary>
  20. /// 编号
  21. /// </summary>
  22. [Required]
  23. [DisplayName("编号")]
  24. public string Code { get; set; }
  25. /// <summary>
  26. /// 名称
  27. /// </summary>
  28. [DisplayName("名称")]
  29. [Required]
  30. public string Name { get; set; }
  31. /// <summary>
  32. /// 授课方式ID
  33. /// </summary>
  34. [DisplayName("授课方式")]
  35. public List<int> TeachingModeTypeID { get; set; }
  36. /// <summary>
  37. /// 备注
  38. /// </summary>
  39. [DisplayName("备注")]
  40. public string Remark { get; set; }
  41. [DisplayName("授课方式集合")]
  42. public IEnumerable<TeachingModeTypeView> TeachingModeTypeViewList { get; set; }
  43. [DisplayName("授课方式集合名称")]
  44. public string TeachingModeTypeName
  45. {
  46. get
  47. {
  48. string name = string.Empty;
  49. if (TeachingModeTypeViewList != null && TeachingModeTypeViewList.Count() > 0)
  50. {
  51. name = string.Join(",", TeachingModeTypeViewList.Select(x =>
  52. x.TeachingModeTypeName));
  53. }
  54. if (string.IsNullOrEmpty(name))
  55. {
  56. return "";
  57. }
  58. else
  59. {
  60. return name;
  61. }
  62. }
  63. }
  64. //[DisplayName("授课方式集合名称")]
  65. //public string TeachingModeTypeName
  66. //{
  67. // get
  68. // {
  69. // string name = string.Empty;
  70. // if (TeachingModeTypeViewList != null && TeachingModeTypeViewList.Count() > 0)
  71. // {
  72. // name = string.Join(",", TeachingModeTypeViewList.Select(x =>
  73. // IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString())
  74. // .Where(w => w.Value == x.TeachingModeType)
  75. // .Select(w => w.Name).FirstOrDefault()
  76. // ));
  77. // }
  78. // if (string.IsNullOrEmpty(name))
  79. // {
  80. // return "";
  81. // }
  82. // else
  83. // {
  84. // return name;
  85. // }
  86. // }
  87. //}
  88. }
  89. public class TeachingModeTypeView
  90. {
  91. /// <summary>
  92. /// 评价类型
  93. /// </summary>
  94. [DisplayName("评价类型ID")]
  95. public Guid? EvaluationIntTypeID { get; set; }
  96. [DisplayName("授课方式")]
  97. public int? TeachingModeType { get; set; }
  98. [DisplayName("授课方式")]
  99. public string TeachingModeTypeName { get; set; }
  100. }
  101. }