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
{
///
/// 主键ID
///
[DisplayName("主键ID")]
public Guid EducationMissionOpenControlID { get; set; }
///
/// 学年学期ID
///
[Required]
[DisplayName("学年学期ID")]
public Guid? SchoolyearID { get; set; }
///
/// 学年学期
///
[DisplayName("学年学期")]
public string SchoolyearCode { get; set; }
///
/// 学年学期对应的Value
///
[DisplayName("Value")]
public int? Value { 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 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; }
}
}