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.ExaminationApply { public class SubjectCountLimitView { /// /// ExaminationSubjectCountLimitID /// public System.Guid? ExaminationSubjectCountLimitID { get; set; } [Required] [DisplayName("考试类型")] public Nullable ExaminationTypeID { get; set; } public string ExaminationTypeName { get; set; } [Required] [DisplayName("院系专业")] public Nullable FacultymajorID { get; set; } public string FacultymajorName { get; set; } [Required] [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")] public Guid? CollegeID { get; set; } [Required] [DisplayName("年级数")] public Nullable Years { get; set; } [DisplayName("报名门数")] [RegularExpression(@"^[1-9]\d*$", ErrorMessage = "必须填写正整数")] public Nullable SubjectCountLimit { get; set; } /// /// RecordStatus /// public Nullable RecordStatus { get; set; } /// /// CreateTime /// public Nullable CreateTime { get; set; } /// /// CreateUserID /// public Nullable CreateUserID { get; set; } /// /// ModifyUserID /// public Nullable ModifyUserID { get; set; } /// /// ModifyTime /// public Nullable ModifyTime { get; set; } public string SchoolyearNumName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString()) .Where(x => x.Value == Years) .Select(x => x.Name).FirstOrDefault(); } } } }