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.EnrollManage.NewStudentManage { public class NewStudentView { /// /// 主键ID /// [DisplayName("主键ID")] public Guid NewStudentID { get; set; } /// /// 考生号 /// [Required] [DisplayName("考生号")] [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入字符或数字")] public string ExamineeNum { get; set; } /// /// 准考证号 /// [DisplayName("准考证号")] [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入字符或数字")] public string AdmissionTicketNo { get; set; } /// /// 姓名 /// [Required] [DisplayName("姓名")] public string Name { 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(); } } /// /// 民族 /// [Required] [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(); } } /// /// 政治面貌 /// [Required] [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 DateTime? BirthDate { get; set; } /// /// 出生日期(Excel导入用) /// [DisplayName("出生日期")] public string BirthDateStr { get; set; } /// /// 证件类型 /// [Required] [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(); } } /// /// 身份证号 /// [Required] [DisplayName("身份证号")] //[RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入字符或数字")] public string IDNumber { get; set; } /// /// 年级 /// [Required] [DisplayName("年级")] public int? GradeID { get; set; } /// /// 年级(Excel导入用) /// [DisplayName("年级")] public string GradeStr { get; set; } /// /// 年级 /// [DisplayName("年级")] public string GradeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Grade.ToString()).Where(x => x.Value == GradeID).Select(x => x.Name).FirstOrDefault(); } } /// /// 学期 /// [Required] [DisplayName("学期")] public int? SemesterID { get; set; } /// /// 学期(Excel导入用) /// [DisplayName("学期")] public string SemesterStr { get; set; } /// /// 学期 /// [DisplayName("学期")] public string SemesterName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Semester.ToString()).Where(x => x.Value == SemesterID).Select(x => x.Name).FirstOrDefault(); } } /// /// 专业信息ID /// [Required] [DisplayName("专业信息ID")] public Guid? SpecialtyID { get; set; } /// /// 省招代码(用于匹配省招专业) /// [DisplayName("省招代码")] public string CustomStandardCode { get; set; } /// /// 专业ID(Value) /// [DisplayName("专业ID(Value)")] public int? StandardID { get; set; } /// /// 专业代码(6位) /// [DisplayName("专业代码")] public string Code { get { var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString()).Where(x => x.Value == StandardID).Select(x => x.Code).FirstOrDefault(); return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : ""); } } /// /// 专业代码 /// [DisplayName("专业代码")] public string StandardCode { get; set; } /// /// 专业名称 /// [DisplayName("专业名称")] public string StandardName { get; set; } /// /// 培养层次 /// [Required] [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")] public int? EducationID { get; set; } /// /// 培养层次(Excel导入用) /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")] public string EducationStr { get; set; } /// /// 培养层次 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")] public string EducationName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString()).Where(x => x.Value == EducationID).Select(x => x.Name).FirstOrDefault(); } } /// /// 学习形式 /// [Required] [DisplayName("学习形式")] public int? LearningformID { get; set; } /// /// 学习形式(Excel导入用) /// [DisplayName("学习形式")] public string LearningformStr { get; set; } /// /// 学习形式 /// [DisplayName("学习形式")] public string LearningformName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString()).Where(x => x.Value == LearningformID).Select(x => x.Name).FirstOrDefault(); } } /// /// 学制 /// [Required] [DisplayName("学制")] [DisplayFormat(DataFormatString = "{0:#.#}")] [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")] public decimal? LearnSystem { get; set; } /// /// 学制(Excel导入用) /// [DisplayName("学制")] public string LearnSystemStr { get; set; } /// /// 入学日期 /// [DisplayName("入学日期")] public DateTime? EntranceDate { get; set; } /// /// 入学日期(Excel导入用) /// [DisplayName("入学日期")] public string EntranceDateStr { get; set; } /// /// 总分 /// [DisplayName("总分")] [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")] public decimal? Score { get; set; } /// /// 总分(Excel导入用) /// [DisplayName("总分")] public string ScoreStr { get; set; } /// /// 联系电话 /// [DisplayName("联系电话")] [RegularExpression(@"^[-0-9]+$", ErrorMessage = "请输入正确格式")] public string Telephone { get; set; } /// /// 邮政编码 /// [DisplayName("邮政编码")] public string ZIPCode { get; set; } /// /// 入学方式 /// [DisplayName("入学方式")] public int? EntranceWayID { get; set; } /// /// 入学方式(Excel导入用) /// [DisplayName("入学方式")] public string EntranceWayStr { get; set; } /// /// 入学方式 /// [DisplayName("入学方式")] public string EntranceWaymName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_EntranceWay.ToString()).Where(x => x.Value == EntranceWayID).Select(x => x.Name).FirstOrDefault(); } } /// /// 考生特征 /// [DisplayName("考生特征")] public int? FeaturesID { get; set; } /// /// 考生特征(Excel导入用) /// [DisplayName("考生特征")] public string FeaturesStr { get; set; } /// /// 考生特征 /// [DisplayName("考生特征")] public string FeaturesName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Features.ToString()).Where(x => x.Value == FeaturesID).Select(x => x.Name).FirstOrDefault(); } } /// /// 生源所属地 /// [DisplayName("生源所属地")] public int? TerritorialID { get; set; } /// /// 生源所属地(Excel导入用) /// [DisplayName("生源所属地")] public string TerritorialStr { get; set; } /// /// 生源所属地 /// [DisplayName("生源所属地")] public string TerritorialName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Province.ToString()).Where(x => x.Value == TerritorialID).Select(x => x.Name).FirstOrDefault(); } } /// /// 通讯地址 /// [DisplayName("通讯地址")] public string Address { get; set; } /// /// 宿舍地址 /// [DisplayName("宿舍地址")] public string Dormitory { get; set; } /// /// 录取通知书编号 /// [DisplayName("录取通知书编号")] public string EnrollmentNo { get; set; } /// /// 照片 /// [DisplayName("照片")] public string RecruitPictureUrl { get; set; } /// /// 照片 /// [DisplayName("照片")] public string RecruitPictureUrlStr { get { if (string.IsNullOrWhiteSpace(this.RecruitPictureUrl)) { return "/Content/images/noPhoto.png"; } else { return this.RecruitPictureUrl; } } } /// /// 照片有无 /// [DisplayName("照片有无")] public bool PhotoHasValue { get; set; } /// /// 照片有无 /// [DisplayName("照片有无")] public string PhotoHasValueName { get { return this.PhotoHasValue != true ? "无" : "有"; } } /// /// 标识状态 /// [DisplayName("标识状态")] public bool IsDoubt { get; set; } /// /// 标识状态 /// [DisplayName("标识状态")] public string IsDoubtName { get { return this.IsDoubt == true ? "是" : "否"; } } /// /// 分配状态 /// [Required] [DisplayName("分配状态")] public int? AssignStatus { get; set; } /// /// 分配状态 /// [DisplayName("分配状态")] public string AssignStatusName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_AssignStatus.ToString()).Where(x => x.Value == AssignStatus).Select(x => x.Name).FirstOrDefault(); } } /// /// 序号 /// [Required] [DisplayName("序号")] public int? OrderNo { get; set; } /// /// 序号(Excel导入用) /// [DisplayName("序号")] public string OrderNoStr { 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 = "CollegeName")] public string CollegeName { get; set; } /// /// 校区 /// [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 = "CampusName")] public string CampusName { get; set; } /// /// 班级信息ID /// [DisplayName("班级信息ID")] public Guid? ClassmajorID { get; set; } /// /// 班级编号 /// [DisplayName("班级编号")] public string ClassmajorNo { get; set; } /// /// 班级名称 /// [DisplayName("班级名称")] public string ClassmajorName { get; set; } /// /// 年级专业ID /// [DisplayName("年级专业ID")] public Guid? GrademajorID { get; set; } /// /// 年级专业代码 /// [DisplayName("年级专业代码")] public string GrademajorCode { get; set; } /// /// 年级专业名称 /// [DisplayName("年级专业名称")] public string GrademajorName { get; set; } /// /// 院系专业ID /// [DisplayName("院系专业ID")] public Guid? FacultymajorID { get; set; } /// /// 院系专业代码 /// [DisplayName("院系专业代码")] public string FacultymajorCode { get; set; } /// /// 院系专业名称 /// [DisplayName("院系专业名称")] public string FacultymajorName { get; set; } /// /// 学号 /// [DisplayName("学号")] [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入字符或数字")] public string StudentNo { get; set; } /// /// 备注 /// [DisplayName("备注")] public string Remark { get; set; } /// /// 错误信息(Excel导入) /// [DisplayName("未导入原因")] public string ErrorMessage { get; set; } /// /// 状态 /// [DisplayName("状态")] public int? RecordStatus { get; set; } /// /// 状态 /// [DisplayName("状态")] public string RecordStatusName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_NewStudentEnterStatus.ToString()).Where(x => x.Value == RecordStatus).Select(x => x.Name).FirstOrDefault(); } } /// /// 创建人 /// [DisplayName("创建人")] public Guid? CreateUserID { get; set; } /// /// 创建时间 /// [DisplayName("创建时间")] public DateTime? CreateTime { get; set; } /// /// 修改人 /// [DisplayName("修改人")] public Guid? ModifyUserID { get; set; } /// /// 修改时间 /// [DisplayName("修改时间")] public DateTime? ModifyTime { get; set; } } }