using EMIS.ViewModel.Cache; using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; namespace EMIS.ViewModel.ScoreManage { public class ExaminationScoreView { [DisplayName("过级成绩ID")] public Guid? ExaminationScoreID { get; set; } [Required] [DisplayName("学年学期")] public Guid? SchoolyearID { get; set; } [DisplayName("学年学期")] public string SchoolyearCode { get; set; } [DisplayName("考试批次")] public Guid? ExaminationBatchProjectID { get; set; } [Required] [DisplayName("考试批次")] public Guid? ExaminationBatchID { get; set; } [DisplayName("考试批次")] public string ExaminationBatchName { get; set; } [Required] [DisplayName("考试类型")] public Guid? ExaminationTypeID { get; set; } [DisplayName("考试类型")] public string ExaminationTypeName { get; set; } [Required] [DisplayName("项目名称")] public Guid? ExaminationProjectID { get; set; } [DisplayName("项目名称")] public string ExaminationProjectName { get; set; } [Required] [DisplayName("考试科目ID")] public int? ExaminationSubjectID { get; set; } [DisplayName("导入考试科目")] public string ExaminationSubjectIDImport { get; set; } [DisplayName("考试科目项")] public string ExaminationSubjectName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.EX_ExaminationSubject.ToString()) .Where(x => x.Value == ExaminationSubjectID) .Select(x => x.Name).FirstOrDefault(); } } [DisplayName("院系")] public Guid? CollegeID { get; set; } [DisplayName("院系")] public string CollegeName { get; set; } /// /// 校区 /// public int? SchoolAreaID { get; set; } public string SchoolAreaName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolArea.ToString()) .Where(x => x.Value == SchoolAreaID) .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? SchoolyearNumID { get; set; } [DisplayName("年级")] public string SchoolyearNumName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString()) .Where(x => x.Value == SchoolyearNumID) .Select(x => x.Name).FirstOrDefault(); } } [DisplayName("专业")] public int? StandardID { get; set; } [DisplayName("专业")] public string StandardName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString()) .Where(x => x.Value == StandardID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 专业代码 /// [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 Guid? ClassmajorID { get; set; } [DisplayName("班级名称")] public string ClassmajorName { get; set; } [DisplayName("学号")] public string StudentNo { get; set; } [Required] [DisplayName("学生")] public Guid? UserID { get; set; } public Guid? UserIDForIDNumber { get; set; } [DisplayName("姓名")] public string UserName { get; set; } [DisplayName("证件类型")] public int? CertificatesType { 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("证件号码")] public string IDNumber { get; set; } [Required] [DisplayName("成绩")] [RegularExpression(@"^\d+(\.\d{2})?$", ErrorMessage = "请输整数或保留2位小数")] public decimal? Score { get; set; } [DisplayName("导入成绩")] public string ScoreImport { get; set; } [DisplayName("导入有效期")] public string ExpireImport { get; set; } [DisplayName("有效期")] public DateTime? Expire { get; set; } [DisplayName("备注")] public string Remark { get; set; } /// /// /// public bool IsExcelVaildateOK { get; set; } /// /// 错误信息 /// [DisplayName("错误信息")] public string ErrorMessage { get; set; } public string Theory { get; set; } public string Skill { get; set; } public string Hearing { get; set; } public string Writing { get; set; } public string Operation { get; set; } public Dictionary ExaminationSubjectIDAndScore { get; set; } public DateTime? CreateTime { get; set; } } }