123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.ViewModel.CacheManage;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using EMIS.Entities;
- namespace EMIS.ViewModel.DQPSystem
- {
- public class SOCDocView
- {
- public SOCDocView()
- {
- this.RoleList = new List<Sys_Role>();
- this.CollegeList = new List<CF_College>();
- }
- public System.Guid DocumentID { get; set; }
-
- [Required]
- [DisplayName("文献类型")]
- public Nullable<int> SOCDocTypeID { get; set; }
- public string SOCDocTypeDesc
- {
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.DQP_SOCDocType.ToString())
- .Where(x => x.Value == SOCDocTypeID)
- .Select(x => x.Name).FirstOrDefault();
- }
- }
- [Required]
- [DisplayName("标题")]
- public string Title { get; set; }
- [Required]
- [DisplayName("信息内容")]
- public string Content { get; set; }
- private bool roleType;
- [DisplayName("面向对象")]
- public bool RoleType
- {
- get
- {
- return RoleList.Count() == 0;
- }
- set
- {
- roleType = value;
- }
- }
- public IEnumerable<Sys_Role> RoleList { get; set; }
- public string RoleName
- {
- get
- {
- return string.Join(",", RoleList.Select(x => x.RoleName));
- }
- }
- private bool collegeType;
- [DisplayName("面向部门")]
- public bool CollegeType
- {
- get
- {
- return CollegeList.Count() == 0;
- }
- set
- {
- collegeType = value;
- }
- }
- public IEnumerable<CF_College> CollegeList { get; set; }
- public string CollegeName
- {
- get
- {
- return string.Join(",", CollegeList.Select(x => x.Name));
- }
- }
-
- public IEnumerable<CF_Department> DepartmentList { get; set; }
- public string DepartmentName
- {
- get
- {
- return string.Join(",", DepartmentList.Select(x => x.Name));
- }
- }
- public Nullable<int> RecordStatus { get; set; }
- public string RecordStatusDesc
- {
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.CF_GeneralPurpose.ToString())
- .Where(x => x.Value == RecordStatus)
- .Select(x => x.Name).FirstOrDefault();
- }
- }
- [DisplayName("是否显示")]
- public bool IsShow { get; set; }
- public Nullable<Guid> CreateCollegeID { get; set; }
- public string CreateCollegeName { get; set; }
- public Nullable<Guid> CreateUserID { get; set; }
- public string CreateUserName { get; set; }
- public Nullable<DateTime> CreateTime { get; set; }
- }
- }
|