using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel.DataAnnotations; using System.ComponentModel; using EMIS.ViewModel.Cache; namespace EMIS.ViewModel { public class CollegeView { /// /// 主键ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")] public Guid CollegeID { get; set; } /// /// 院系所代码 /// [Required] [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")] [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入数字或英文字母")] public string No { get; set; } /// /// 院系所名称 /// [Required] [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeName")] public string Name { get; set; } /// /// 简称 /// [DisplayName("简称")] public string SimpleName { get; set; } /// /// 英文名称 /// [DisplayName("英文名称")] public string EnglishName { get; set; } /// /// 校区ID /// [Required] [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; } /// /// 党务负责人 /// [DisplayName("党务负责人")] public Guid? PoliticalManager { get; set; } /// /// 党务负责人 /// [DisplayName("党务负责人")] public string PoliticalManagerName { get; set; } /// /// 行政负责人 /// [DisplayName("行政负责人")] public Guid? AdministrativeManager { get; set; } /// /// 行政负责人 /// [DisplayName("行政负责人")] public string AdministrativeManagerName { get; set; } /// /// 单位类别 /// [Required] [DisplayName("单位类别")] public int? UnitCategoryID { get; set; } /// /// 单位类别 /// [DisplayName("单位类别")] public string UnitCategoryStr { get; set; } /// /// 单位类别 /// [DisplayName("单位类别")] public string UnitCategoryName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_UnitCategory.ToString()) .Where(x => x.Value == UnitCategoryID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 院系类型 /// [DisplayName("院系类型")] public int? CollegeTypeID { get; set; } /// /// 院系类型 /// [DisplayName("院系类型")] public string CollegeTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CollegeType.ToString()) .Where(x => x.Value == CollegeTypeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 院系类别 /// [DisplayName("院系类别")] public int? CollegeCategoryID { get; set; } /// /// 院系类别 /// [DisplayName("院系类别")] public string CollegeCategoryName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CollegeCategory.ToString()) .Where(x => x.Value == CollegeCategoryID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 办学类别 /// [DisplayName("办学类别")] public int? RunByCategoryID { get; set; } /// /// 办学类别 /// [DisplayName("办学类别")] public string RunByCategoryName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_RunByCategory.ToString()) .Where(x => x.Value == RunByCategoryID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 建立年月 /// [DisplayName("建立年月")] public DateTime? FoundDate { get; set; } /// /// 建立年月 /// [DisplayName("建立年月")] public string FoundDateStr { get; set; } /// /// 办公电话 /// [DisplayName("办公电话")] public string Officephone { get; set; } /// /// 备注 /// [DisplayName("备注")] public string Remark { get; set; } /// /// 错误信息(Excel导入) /// [DisplayName("未导入原因")] public string ErrorMessage { get; set; } /// /// 状态 /// [DisplayName("状态")] public int? RecordStatus { get; set; } /// /// 创建人 /// [DisplayName("创建人")] public Guid? CreateUserID { get; set; } /// /// 创建时间 /// [DisplayName("创建时间")] public DateTime? CreateTime { get; set; } /// /// 修改人 /// [DisplayName("修改人")] public Guid? ModifyUserID { get; set; } /// /// 修改时间 /// [DisplayName("修改时间")] public DateTime? ModifyTime { get; set; } } }