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.SelectCourse { public class OptionalCourseSettingCreateView { /// /// 学年学期ID /// [Required] [DisplayName("学年学期ID")] public Guid? SchoolyearID { get; set; } /// /// 学年学期 /// [DisplayName("学年学期")] public string SchoolYearCode { get; set; } /// /// 校区ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")] public Nullable CampusID { get; set; } /// /// 院系所ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")] public Nullable CollegeID { get; set; } /// /// 院系所 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")] public string CollegeName { get; set; } /// /// 年级专业 /// [DisplayName("年级专业")] public Guid? GrademajorID { get; set; } /// /// 年级(年级专业对应的年级) /// [DisplayName("年级")] public int? GradeID { get; set; } /// /// 年级(年级专业对应的年级) /// [DisplayName("年级")] public string Grade { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Grade.ToString()).Where(x => x.Value == GradeID).Select(x => x.Name).FirstOrDefault(); } } /// /// 学年 /// [DisplayName("学年")] public int? Years { get; set; } /// /// 院系专业 /// 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 StandardDesc { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString()) .Where(x => x.Value == StandardID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 课程名称 /// [DisplayName("课程名称")] public string CourseName { get; set; } /// /// 课程信息ID /// public Guid? CoursematerialID { get; set; } /// /// 年级专业名称 /// [DisplayName("年级专业名称")] public string GrademajorName { get; set; } } }