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.Students { public class StudentsView { /// /// 用户ID /// [DisplayName("用户ID")] public Guid UserID { get; set; } /// /// 学号 /// [Required] [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "只能输入数字和英文字母")] [DisplayName("学号")] public string LoginID { get; set; } /// /// 姓名 /// [Required] [DisplayName("姓名")] public string UserName { get; set; } public string Name { get { return UserName; } } /// /// 性别 /// [Required] [DisplayName("性别")] public int? SexID { 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? CertificatesType { get; set; } /// /// 证件号码 /// [Required] [DisplayName("证件号码")] public string IDNumber { get; set; } /// /// 班级名称 /// [Required] [DisplayName("班级名称")] public Guid? ClassMajorID { get; set; } /// /// 班级编号 /// [DisplayName("班级编号")] public string ClassMajorCode { get; set; } /// /// 班级名称 /// [DisplayName("班级名称")] public string ClassMajorName { get; set; } /// /// 班号 /// [DisplayName("班号")] public int? ClassNum { get; set; } /// /// 班号 /// [DisplayName("班号")] public string ClassNumStr { get { if (ClassNum.HasValue) { return ClassNum.ToString(); } else { return ""; } } } /// /// 照片 /// [DisplayName("照片")] public string PhotoUrl { get; set; } /// /// 学籍状态 /// [Required] [DisplayName("学籍状态")] public int? StudentStatus { get; set; } /// /// 学籍状态名称 /// [DisplayName("学籍状态")] public string StudentStatusName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StudentStatus.ToString()) .Where(x => x.Value == StudentStatus).Select(x => x.Name).FirstOrDefault(); } } /// /// 学生类别 /// [Required] [DisplayName("学生类别")] public int? StudentType { get; set; } /// /// 学生类别名称 /// [DisplayName("学生类别名称")] public string StudentTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_STUDENTTYPE.ToString()) .Where(x => x.Value == StudentType) .Select(x => x.Name).FirstOrDefault(); } } /// /// 学籍卡编号 /// [DisplayName("学籍卡编号")] public string StudentCardNo { get; set; } /// /// 学籍卡编号 /// [DisplayName("办学类型")] public string BXLX { get; set; } /// /// 培养方式 /// [DisplayName("培养方式")] public int? CultureModel { get; set; } /// /// 培养方式 /// [DisplayName("培养方式名称")] public string CultureModelName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CULTUREMODEL.ToString()) .Where(x => x.Value == CultureModel) .Select(x => x.Name).FirstOrDefault(); } } /// /// 毕结业证书编号 /// [DisplayName("毕结业证书编号")] public string GraduateCardNo { get; set; } /// /// 毕业结论 /// [Required] [DisplayName("毕业结论")] public int? GraduationResult { get; set; } /// /// 校长名 /// [DisplayName("校长名")] public string HeadMasterName { get; set; } /// /// 毕业结论 /// [DisplayName("毕业结论")] public string GraduationResultName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_InschoolStatus.ToString()) .Where(x => x.Value == GraduationResult) .Select(x => x.Name).FirstOrDefault(); } } /// /// 预计毕业日期 /// [DisplayName("预计毕业日期")] [DataType(DataType.Date)] [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}")] public DateTime? PlanningGraduateDate { get; set; } public string PlanningGraduateStr { get; set; } public DateTime? PlanningGraduateDateStr { get; set; } [DisplayName("预计毕业学年学期")] public Guid? PlanningGraduateSchoolYearID { get; set; } [DisplayName("预计毕业年")] public int? PlanningGraduateYear { get; set; } [DisplayName("预计毕业学期")] public int? PlanningGraduateSchoolCodeID { get; set; } [DisplayName("预计毕业学期代码")] //CF_Schoolcode 值 public int? PlanningGraduateSchoolCode { get; set; } [DisplayName("预计毕业学期名称")] //CF_Schoolcode Name 春季或秋季 public string PlanningGraduateSchoolCodeName { get; set; } /// /// 在校状态 /// [DisplayName("在校状态")] [Required] public int? InSchoolStatusID { get; set; } /// /// 在校状态名称 /// [DisplayName("在校状态")] public string InSchoolStatusName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_InschoolStatus.ToString()) .Where(x => x.Value == InSchoolStatusID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 报到状态 /// [DisplayName("报到状态")] public int? ReportStatusID { get; set; } /// /// 报到状态Name /// [DisplayName("报到状态")] public string ReportStatusName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ReportStatus.ToString()) .Where(x => x.Value == ReportStatusID) .Select(x => x.Name).FirstOrDefault(); } } /// ///曾用名 /// [DisplayName("曾用名")] public string UsedName { get; set; } /// /// 导师姓名 /// [DisplayName("导师姓名")] public string DirectorName { get; set; } /// /// 出生日期 /// [DisplayName("出生日期")] [DataType(DataType.Date)] [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}")] public DateTime? BirthDate { get; set; } /// /// 毕业日期 /// [DisplayName("毕业日期")] [DataType(DataType.Date)] [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}")] public DateTime? GraduateDate { get; set; } /// /// 国籍 /// [DisplayName("国籍")] public string Country { get; set; } /// /// 政治面貌 /// [DisplayName("政治面貌")] [Required] public int? Politics { get; set; } // //政治面貌 // [DisplayName("政治面貌")] public string PoliticsName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Politics.ToString()) .Where(x => x.Value == Politics) .Select(x => x.Name).FirstOrDefault(); } } /// /// 民族 /// [DisplayName("民族")] public int? Nation { get; set; } /// /// 籍贯 /// [DisplayName("籍贯")] public string Place { get; set; } /// /// 健康状态 /// [DisplayName("健康状态")] public int? Healthy { get; set; } /// /// 血型 /// [DisplayName("血型")] public int? BloodGroup { get; set; } /// /// 血型名称 /// [DisplayName("血型名称")] public string BloodGroupName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_BLOODGROUP.ToString()) .Where(x => x.Value == BloodGroup) .Select(x => x.Name).FirstOrDefault(); } } ///// ///// 出生地 ///// //[DisplayName("出生地")] //public string BornPlace { get; set; } /// /// 特长 /// [DisplayName("特长")] public string Specialty { get; set; } /// /// 身高 /// [DisplayName("身高")] public string Height { get; set; } /// /// 体重 /// [DisplayName("体重")] public string Weight { get; set; } /// /// 备注 /// [DisplayName("备注")] public string Remarks { get; set; } /// /// 毕业照片 /// [DisplayName("毕业照片")] public string GraduationPictureUrl { get; set; } /// /// 电子邮件 /// [DisplayName("电子邮件")] public string Email { get; set; } /// /// QQ /// [DisplayName("QQ")] public string QQ { get; set; } /// /// 微信号 /// [DisplayName("微信号")] public string MicroMsgNo { get; set; } /// /// 移动电话 /// [DisplayName("移动电话")] public string Mobile { get; set; } /// /// 固定电话 /// [DisplayName("固定电话")] public string Telephone { get; set; } /// /// 邮编 /// [DisplayName("邮编")] public string ZipCode { get; set; } /// /// 家庭地址 /// [DisplayName("家庭地址")] public string HomeAddress { get; set; } /// /// 收件人 /// [DisplayName("收件人")] public string Recipient { get; set; } /// /// 工作单位 /// [DisplayName("工作单位")] public string WorkUnit { get; set; } /// /// 通信地址 /// [DisplayName("通信地址")] public string Address { get; set; } /// /// 宿舍编号 /// [DisplayName("宿舍编号")] public string Dormitory { get; set; } /// /// 银行卡号 /// [DisplayName("银行卡号")] public string CardNo { get; set; } [DisplayName("周数")] public int WeeksNum { get; set; } /// /// 开户银行 /// [DisplayName("开户银行")] public string BankName { get; set; } /// /// 考生号 /// [DisplayName("考生号")] public string ExamineeNum { get; set; } /// /// 考生类别 /// [DisplayName("考生类别")] public int? ExamineeType { get; set; } /// /// 入学日期 /// [DisplayName("入学日期")] [DataType(DataType.Date)] [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}")] public DateTime? EntranceDate { get; set; } /// /// 入学学期 /// [Required] [DisplayName("入学学期")] public Guid? EnteringSchoolYearID { get; set; } /// /// 入学学期 /// [DisplayName("入学学期")] public string EnteringSchoolYearCode { get; set; } /// /// 入学方式 /// [DisplayName("入学方式")] public int? EntranceWay { get; set; } /// /// 生源所属地 /// [DisplayName("生源所属地")] public int? Territorial { get; set; } /// /// 生源所属地名称 /// [DisplayName("生源所属地名称")] public string TerritorialName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Province.ToString()) .Where(x => x.Value == Territorial) .Select(x => x.Name).FirstOrDefault(); } } /// /// 来源地区 /// [DisplayName("来源地区")] public string Area { get; set; } /// /// 高考总分 /// [DisplayName("高考总分")] public decimal? Score { get; set; } /// /// 考生特征 /// [DisplayName("考生特征")] public int? Features { get; set; } /// /// 年级 /// [DisplayName("年级")] public int? Grade { get; set; } /// /// 年级 /// [DisplayName("年级")] public int? Years { get; set; } /// /// 出生地 /// [DisplayName("出生地")] public string Placebirth { get; set; } /// /// 民族姓名 /// [DisplayName("民族")] public string NationName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Nation.ToString()) .Where(x => x.Value == Nation) .Select(x => x.Name).FirstOrDefault(); } } /// /// 校区ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")] public Guid? CampusID { get; set; } /// /// 校区ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")] public string CampusName { get; set; } /// /// 办学类型 /// [DisplayName("办学类型")] public int? SchoolTypeID { get; set; } /// /// 办学类型 /// [DisplayName("办学类型")] public string SchoolTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolType.ToString()) .Where(x => x.Value == SchoolTypeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 学院ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")] public Guid? CollegeID { get; set; } public string CollegeCode { get; set; } /// /// 学院 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")] public string CollegeName { get; set; } /// /// 培养层次 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")] public int? EducationID { get; set; } /// /// 院校代码 /// [DisplayName("院校代码")] public string SchoolCode { get; set; } /// /// 院校名称 /// [DisplayName("院校名称")] public string SchoolName { get; set; } /// /// 学制 /// [DisplayName("学制")] public decimal? LearnSystem { get; set; } /// /// 培养方案 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")] public string EducationName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString()) .Where(x => x.Value == EducationID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 标准专业 /// [DisplayName("标准专业")] public int? StandardID { get; set; } /// /// 专业代码 /// [DisplayName("专业代码")] public string StandardCode { 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 StandardName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString()) .Where(x => x.Value == StandardID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 学习形式 /// [DisplayName("学习形式")] public int? LearningformID { get; set; } /// /// 学习形式 /// [DisplayName("学习形式")] public string LearningformName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString()) .Where(x => x.Value == LearningformID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 证件名称 /// [DisplayName("证件名称")] public string CertificatesTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CertificatesType.ToString()) .Where(x => x.Value == CertificatesType) .Select(x => x.Name).FirstOrDefault(); } } /// /// 考生类别 /// [DisplayName("考生类别")] public string ExamineeTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_EXAMINEETYPE.ToString()) .Where(x => x.Value == ExamineeType) .Select(x => x.Name).FirstOrDefault(); } } /// /// 入学方式 /// [DisplayName("入学方式")] public string EntranceWayName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_EntranceWay.ToString()) .Where(x => x.Value == EntranceWay) .Select(x => x.Name).FirstOrDefault(); } } /// /// 考生特征 /// [DisplayName("考生特征")] public string FeaturesName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Features.ToString()) .Where(x => x.Value == Features) .Select(x => x.Name).FirstOrDefault(); } } /// /// 健康状态 /// [DisplayName("健康状态")] public string HealthyName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HealthState.ToString()) .Where(x => x.Value == Healthy) .Select(x => x.Name).FirstOrDefault(); } } /// /// 年级专业ID /// public Guid? GradeMajorID { get; set; } /// /// 临时记录ID /// 用于记录异动涉及更新表的相关ID /// public Guid? TepTableID { get; set; } /// /// 年级专业代码 /// [DisplayName("专业代码")] public string GradeMajorCode { get; set; } /// /// 年级专业名称 /// [DisplayName("年级专业名称")] public string GradeMajorName { get; set; } /// /// 院系所专业 /// [DisplayName("院系所专业")] public string FacultymajorName { get; set; } ///// ///// 毕结业证书编号 ///// //[DisplayName("毕结业证书编号")] //public string GraduationNumber { get; set; } /// ///是否有照片 /// [DisplayName("是否有照片")] public int IsPhoto { get; set; } /// /// 是否核对 /// [DisplayName("是否核对")] public bool? IsProofread { get; set; } /// /// 是否核对 /// [DisplayName("是否核对")] public string IsProofreadStr { get { return this.IsProofread == null ? "" : (IsProofread == true ? "是":"否"); } } /// ///是否有照片 /// [DisplayName("是否有照片")] public string IsPhotoUrl { get; set; } /// /// 圆梦计划 /// [Required] [DisplayName("圆梦计划")] public bool IsDreamProject { get; set; } /// /// 在校经历 /// [DisplayName("在校经历")] public string Career { get; set; } /// /// 是否是圆梦计划 /// [DisplayName("是否是圆梦计划")] public string IsDreamProjectName { get { return this.IsDreamProject != true ? "否" : "是"; } } /// /// 补考次数 /// [DisplayName("补考次数")] public int MakeupNum { get; set; } /// /// 是否可以修改 /// public bool IsCanChange { get; set; } public string AdmissionTicketNo { get; set; } public bool LoginIDToPicture { get; set; } public string ExportPictureType { get; set; } /// /// 补证号 /// [DisplayName("补证号")] public string ReplaceGraduateNo { get; set; } /// /// 文化程度 /// [DisplayName("文化程度")] public int? LiteracyLevels { get; set; } /// /// 文化程度 /// [DisplayName("文化程度")] public string LiteracyLevelsStr { get; set; } /// /// 文化程度 /// [DisplayName("文化程度")] public string LiteracyLevelsName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_LiteracyLevel.ToString()) .Where(x => x.Value == LiteracyLevels) .Select(x => x.Name).FirstOrDefault(); } } } }