using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using EMIS.ViewModel.CacheManage; namespace EMIS.ViewModel.SchedulingManage { public class CollegePriorityView { /// /// 主键ID /// [DisplayName("主键ID")] public Guid CollegePriorityID { get; set; } /// /// 院系所ID /// [Required] [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")] public Guid? CollegeID { get; set; } /// /// 院系所代码 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")] public string CollegeNo { get; set; } /// /// 院系所 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")] public string CollegeName { get; set; } /// /// 单位类别 /// [DisplayName("单位类别")] public int? UnitCategoryID { get; set; } /// /// 单位类别 /// [DisplayName("单位类别")] public string UnitCategoryName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_UnitCategory.ToString()) .Where(x => x.Value == UnitCategoryID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 校区ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")] public Guid? CampusID { get; set; } /// /// 校区代码 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")] public string CampusNo { get; set; } /// /// 校区 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")] public string CampusName { get; set; } /// /// 优先级 /// [Required] [DisplayName("优先级")] public int? Priority { get; set; } /// /// 开始日期 /// [Required] [DisplayName("开始日期")] public DateTime? StartDate { get; set; } /// /// 结束日期 /// [Required] [DisplayName("结束日期")] public DateTime? EndDate { get; set; } /// /// 开放天数 /// [DisplayName("开放天数")] public int? OpenDays { get { if (StartDate == null || EndDate == null) { return null; } else { return EndDate.Value.Subtract(StartDate.Value).Days; } } } /// /// 状态 /// [DisplayName("状态")] public int? RecordStatus { get; set; } /// /// 创建人 /// [DisplayName("创建人")] public Guid? CreateUserID { get; set; } /// /// 创建人 /// [DisplayName("创建人")] public string CreateUserName { get; set; } /// /// 创建时间 /// [DisplayName("创建时间")] public DateTime? CreateTime { get; set; } /// /// 修改人 /// [DisplayName("修改人")] public Guid? ModifyUserID { get; set; } /// /// 修改时间 /// [DisplayName("修改时间")] public DateTime? ModifyTime { get; set; } } }