using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using EMIS.ViewModel.CacheManage; namespace EMIS.ViewModel.UniversityManage.TeacherManage { public class StaffView { /// /// 主键ID /// [DisplayName("主键ID")] public Guid UserID { get; set; } /// /// 教职工号 /// [Required] [DisplayName("教职工号")] [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入数字或英文字母")] public string StaffCode { get; set; } /// /// 姓名 /// [Required] [DisplayName("姓名")] public string Name { get; set; } /// /// 校区ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")] public Guid? CampusID { get; set; } /// /// 校区代码 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")] public string CampusCode { get; set; } /// /// 校区名称 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")] public string CampusName { get; set; } /// /// 院系所ID /// [Required] [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")] 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; } /// /// 所属教研室ID /// [DisplayName("所属教研室ID")] public Guid? DepartmentID { get; set; } /// /// 所属教研室代码 /// [DisplayName("所属教研室代码")] public string DepartmentCode { get; set; } /// /// 所属教研室 /// [DisplayName("所属教研室")] public string DepartmentName { get; set; } /// /// 曾用名 /// [DisplayName("曾用名")] public string UsedName { get; set; } /// /// 国籍 /// [DisplayName("国籍")] public string Nationality { get; set; } /// /// 籍贯 /// [DisplayName("籍贯")] public string Place { get; set; } /// /// 性别 /// [Required] [DisplayName("性别")] public int? SexID { get; set; } /// /// 性别(Excel导入) /// [DisplayName("性别")] public string SexStr { get; set; } /// /// 性别 /// [DisplayName("性别")] public string SexName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Sex.ToString()).Where(x => x.Value == SexID).Select(x => x.Name).FirstOrDefault(); } } /// /// 出生日期 /// [DisplayName("出生日期")] [DataType(DataType.DateTime)] [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}")] public DateTime? BirthDate { get; set; } /// /// 出生日期(Excel导入) /// [DisplayName("出生日期")] public string BirthDateStr { get; set; } /// /// 民族 /// [DisplayName("民族")] public int? NationID { get; set; } /// /// 民族(Excel导入) /// [DisplayName("民族")] public string NationStr { get; set; } /// /// 民族 /// [DisplayName("民族")] public string NationName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Nation.ToString()).Where(x => x.Value == NationID).Select(x => x.Name).FirstOrDefault(); } } /// /// 政治面貌 /// [DisplayName("政治面貌")] public int? PoliticsID { get; set; } /// /// 政治面貌(Excel导入) /// [DisplayName("政治面貌")] public string PoliticsStr { get; set; } /// /// 政治面貌 /// [DisplayName("政治面貌")] public string PoliticsName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Politics.ToString()).Where(x => x.Value == PoliticsID).Select(x => x.Name).FirstOrDefault(); } } /// /// 证件类型 /// [DisplayName("证件类型")] public int? CertificatesType { get; set; } /// /// 证件类型(Excel导入) /// [DisplayName("证件类型")] public string CertificatesTypeStr { get; set; } /// /// 证件类型 /// [DisplayName("证件类型")] public string CertificatesTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CertificatesType.ToString()).Where(x => x.Value == CertificatesType).Select(x => x.Name).FirstOrDefault(); } } /// /// 证件号码 /// [DisplayName("证件号码")] [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入正确的证件号码格式")] public string CertificatesNum { get; set; } /// /// 教师类型 /// [Required] [DisplayName("教师类型")] public int? TeacherTypeID { get; set; } /// /// 教师类型(Excel导入) /// [DisplayName("教师类型")] public string TeacherTypeStr { get; set; } /// /// 教师类型 /// [DisplayName("教师类型")] public string TeacherTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeacherType.ToString()).Where(x => x.Value == TeacherTypeID).Select(x => x.Name).FirstOrDefault(); } } /// /// 在职状态 /// [Required] [DisplayName("在职状态")] public int? IncumbencyState { get; set; } /// /// 在职状态(Excel导入) /// [DisplayName("在职状态")] public string IncumbencyStateStr { get; set; } /// /// 在职状态 /// [DisplayName("在职状态")] public string IncumbencyStateName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_IncumbencyState.ToString()).Where(x => x.Value == IncumbencyState).Select(x => x.Name).FirstOrDefault(); } } /// /// 任课状况 /// [DisplayName("任课状况")] public int? SituationID { get; set; } /// /// 任课状况(Excel导入) /// [DisplayName("任课状况")] public string SituationStr { get; set; } /// /// 任课状况 /// [DisplayName("任课状况")] public string SituationName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Situation.ToString()).Where(x => x.Value == SituationID).Select(x => x.Name).FirstOrDefault(); } } /// /// 职称 /// [DisplayName("职称")] public int? TitleID { get; set; } /// /// 职称(Excel导入) /// [DisplayName("职称")] public string TitleStr { get; set; } /// /// 职称 /// [DisplayName("职称")] public string TitleName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Title.ToString()).Where(x => x.Value == TitleID).Select(x => x.Name).FirstOrDefault(); } } /// /// 文化程度 /// [DisplayName("文化程度")] public int? LiteracyLevelID { get; set; } /// /// 文化程度(Excel导入) /// [DisplayName("文化程度")] public string LiteracyLevelStr { get; set; } /// /// 文化程度 /// [DisplayName("文化程度")] public string LiteracyLevelName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_LiteracyLevel.ToString()).Where(x => x.Value == LiteracyLevelID).Select(x => x.Name).FirstOrDefault(); } } /// /// 学位 /// [DisplayName("学位")] public int? LearnPositionID { get; set; } /// /// 学位(Excel导入) /// [DisplayName("学位")] public string LearnPositionStr { get; set; } /// /// 学位 /// [DisplayName("学位")] public string LearnPositionName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_LearnPosition.ToString()).Where(x => x.Value == LearnPositionID).Select(x => x.Name).FirstOrDefault(); } } /// /// 是否双师型 /// [DisplayName("是否双师型")] public bool IsDualTeacher { get; set; } /// /// 是否双师型(Excel导入) /// [DisplayName("是否双师型")] public string IsDualTeacherStr { get; set; } /// /// 是否双师型 /// [DisplayName("是否双师型")] public string IsDualTeacherName { get { return this.IsDualTeacher == true ? "是" : "否"; } } /// /// 课酬级别 /// [DisplayName("课酬级别")] public int? PaymentLevelID { get; set; } /// /// 课酬级别(Excel导入) /// [DisplayName("课酬级别")] public string PaymentLevelStr { get; set; } /// /// 课酬级别 /// [DisplayName("课酬级别")] public string PaymentLevelName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.TP_PaymentLevel.ToString()).Where(x => x.Value == PaymentLevelID).Select(x => x.Name).FirstOrDefault(); } } /// /// 参加工作年月 /// [DisplayName("参加工作年月")] [DataType(DataType.DateTime)] public DateTime? WorkDate { get; set; } /// /// 参加工作年月(Excel导入) /// [DisplayName("参加工作年月")] public string WorkDateStr { get; set; } /// /// 来校年月 /// [DisplayName("来校年月")] [DataType(DataType.DateTime)] public DateTime? ComeSchoolDate { get; set; } /// /// 来校年月(Excel导入) /// [DisplayName("来校年月")] public string ComeSchoolDateStr { get; set; } /// /// 电子邮箱 /// [DisplayName("电子邮箱")] [RegularExpression(@"^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$", ErrorMessage = "请输入正确的格式")] public string Email { get; set; } /// /// 邮政编码 /// [DisplayName("邮政编码")] [RegularExpression(@"[1-9]\d{5}(?!\d)", ErrorMessage = "请输入正确的格式")] public string ZIPCode { get; set; } /// /// 微信号 /// [DisplayName("微信号")] public string WeChatNum { get; set; } /// /// QQ /// [DisplayName("QQ")] [RegularExpression(@"[1-9][0-9]{4,}", ErrorMessage = "请输入正确的格式")] public string QQ { get; set; } /// /// 家庭电话 /// [DisplayName("家庭电话")] public string Telephone { get; set; } /// /// 办公电话 /// [DisplayName("办公电话")] public string OfficeTelephone { get; set; } /// /// 住宅电话 /// [DisplayName("住宅电话")] public string HousePhone { get; set; } /// /// 移动电话 /// [DisplayName("移动电话")] public string Mobile { get; set; } /// /// 健康状况 /// [DisplayName("健康状况")] public int? HealthStateID { get; set; } /// /// 健康状况(Excel导入) /// [DisplayName("健康状况")] public string HealthStateStr { get; set; } /// /// 健康状况 /// [DisplayName("健康状况")] public string HealthStateName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HealthState.ToString()).Where(x => x.Value == HealthStateID).Select(x => x.Name).FirstOrDefault(); } } /// /// 宗教信仰 /// [DisplayName("宗教信仰")] public int? ReligionID { get; set; } /// /// 宗教信仰(Excel导入) /// [DisplayName("宗教信仰")] public string ReligionStr { get; set; } /// /// 宗教信仰 /// [DisplayName("宗教信仰")] public string ReligionName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Religion.ToString()).Where(x => x.Value == ReligionID).Select(x => x.Name).FirstOrDefault(); } } /// /// 特长 /// [DisplayName("特长")] public string Speciality { get; set; } /// /// 银行卡号 /// [DisplayName("银行卡号")] [RegularExpression(@"^[0-9]*$", ErrorMessage = "只能输入数字")] public string Account { get; set; } /// /// 户口所在地 /// [DisplayName("户口所在地")] public string Residence { get; set; } /// /// 家庭住址 /// [DisplayName("家庭住址")] public string HomeAddress { get; set; } /// /// 通信地址 /// [DisplayName("通信地址")] public string Address { get; set; } /// /// 现住地址 /// [DisplayName("现住地址")] public string NowAddress { get; set; } /// /// 照片 /// [DisplayName("照片")] public string PhotoUrl { get; set; } /// /// 照片 /// [DisplayName("照片")] public string PhotoUrlStr { get { if (string.IsNullOrWhiteSpace(this.PhotoUrl)) { return "/Content/images/noPhoto.png"; } else { return this.PhotoUrl; } } } /// /// 照片有无 /// [DisplayName("照片有无")] public bool PhotoHasValue { get; set; } /// /// 照片有无 /// [DisplayName("照片有无")] public string PhotoHasValueName { get { return this.PhotoHasValue != true ? "无" : "有"; } } /// /// 简介 /// [DisplayName("简介")] public string Profile { get; set; } /// /// 角色数 /// [DisplayName("角色数")] public int? RoleCount { get; set; } /// /// 帐号状态 /// [DisplayName("帐号状态")] public int? AccountStatus { get; set; } /// /// 帐号状态 /// [DisplayName("帐号状态")] public string AccountStatusName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.SYS_STATUS.ToString()).Where(x => x.Value == AccountStatus).Select(x => x.Name).FirstOrDefault(); } } /// /// 备注 /// [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; } } }