SOCDocView.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.ViewModel.CacheManage;
  6. using System.ComponentModel;
  7. using System.ComponentModel.DataAnnotations;
  8. using EMIS.Entities;
  9. namespace EMIS.ViewModel.DQPSystem
  10. {
  11. public class SOCDocView
  12. {
  13. public SOCDocView()
  14. {
  15. this.RoleList = new List<Sys_Role>();
  16. this.CollegeList = new List<CF_College>();
  17. }
  18. public System.Guid DocumentID { get; set; }
  19. [Required]
  20. [DisplayName("文献类型")]
  21. public Nullable<int> SOCDocTypeID { get; set; }
  22. public string SOCDocTypeDesc
  23. {
  24. get
  25. {
  26. return IdNameExt.GetDictionaryItem(DictionaryItem.DQP_SOCDocType.ToString())
  27. .Where(x => x.Value == SOCDocTypeID)
  28. .Select(x => x.Name).FirstOrDefault();
  29. }
  30. }
  31. [Required]
  32. [DisplayName("标题")]
  33. public string Title { get; set; }
  34. [Required]
  35. [DisplayName("信息内容")]
  36. public string Content { get; set; }
  37. private bool roleType;
  38. [DisplayName("面向对象")]
  39. public bool RoleType
  40. {
  41. get
  42. {
  43. return RoleList.Count() == 0;
  44. }
  45. set
  46. {
  47. roleType = value;
  48. }
  49. }
  50. public IEnumerable<Sys_Role> RoleList { get; set; }
  51. public string RoleName
  52. {
  53. get
  54. {
  55. return string.Join(",", RoleList.Select(x => x.RoleName));
  56. }
  57. }
  58. private bool collegeType;
  59. [DisplayName("面向部门")]
  60. public bool CollegeType
  61. {
  62. get
  63. {
  64. return CollegeList.Count() == 0;
  65. }
  66. set
  67. {
  68. collegeType = value;
  69. }
  70. }
  71. public IEnumerable<CF_College> CollegeList { get; set; }
  72. public string CollegeName
  73. {
  74. get
  75. {
  76. return string.Join(",", CollegeList.Select(x => x.Name));
  77. }
  78. }
  79. public IEnumerable<CF_Department> DepartmentList { get; set; }
  80. public string DepartmentName
  81. {
  82. get
  83. {
  84. return string.Join(",", DepartmentList.Select(x => x.Name));
  85. }
  86. }
  87. public Nullable<int> RecordStatus { get; set; }
  88. public string RecordStatusDesc
  89. {
  90. get
  91. {
  92. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_GeneralPurpose.ToString())
  93. .Where(x => x.Value == RecordStatus)
  94. .Select(x => x.Name).FirstOrDefault();
  95. }
  96. }
  97. [DisplayName("是否显示")]
  98. public bool IsShow { get; set; }
  99. public Nullable<Guid> CreateCollegeID { get; set; }
  100. public string CreateCollegeName { get; set; }
  101. public Nullable<Guid> CreateUserID { get; set; }
  102. public string CreateUserName { get; set; }
  103. public Nullable<DateTime> CreateTime { get; set; }
  104. }
  105. }