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.ExaminationApply { public class OpenControlView { /// /// ExaminationOpenControlID /// public System.Guid? ExaminationOpenControlID { get; set; } [Required] [DisplayName("考试科目")] public Nullable ExaminationSubjectID { get; set; } [Required] [DisplayName("考试科目")] public Nullable ExaminationSubjectEditID { get; set; } public string ExaminationSubjectName { get; set; } [Required] [DisplayName("考试类型")] public Nullable ExaminationTypeID { get; set; } public string ExaminationTypeName { get; set; } /// /// 学生类别 /// [Required] [DisplayName("学生类别")] public List StudentTypeID { get; set; } [Required] [DisplayName("学生类别")] public Nullable StudentType { get; set; } public string StudentTypeDesc { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_STUDENTTYPE.ToString()) .Where(x => x.Value == StudentType) .Select(x => x.Name).FirstOrDefault(); } } [Required] [DisplayName("年级数")] public Nullable SchoolyearNumID { get; set; } public string SchoolyearNumName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString()) .Where(x => x.Value == SchoolyearNumID) .Select(x => x.Name).FirstOrDefault(); } } [Required] [DisplayName("报名时间起")] public Nullable StartDate { get; set; } [Required] [DisplayName("报名时间止")] public Nullable EndDate { get; set; } [Required] [DisplayName("限定人数")] // [RegularExpression(@"^[1-9]{1,3}$", ErrorMessage = "只能输入1至3位整数")] [RegularExpression(@"^[0-9]\d*$", ErrorMessage = "必须填写正整数")] public int? PeopleNumLimit { 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; } } }