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