using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.ViewModel.CultureplanManage; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using EMIS.ViewModel.Cultureplan; using EMIS.ViewModel.CacheManage; using EMIS.ViewModel.UniversityManage.SpecialtyClassManage; namespace EMIS.ViewModel.DQPSystem { public class SOCTemplateView { /// /// 主键ID /// [DisplayName("主键ID")] public Guid SOCTemplateID { get; set; } /// /// 院系专业ID /// [DisplayName("院系专业ID")] public Guid? FacultymajorID { get; set; } /// /// 院系专业 /// [DisplayName("院系专业")] public string FacultymajorName { get; set; } /// /// 专业ID(Value) /// //[Required] [DisplayName("专业ID(Value)")] 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(); } } /// /// 培养层次/学历 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")] public int? EducationID { 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(); } } /// /// 学制 /// //[Required] [DisplayName("学制")] //[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")] public decimal? LearnSystem { get; set; } /// /// 学习形式 /// //[Required] [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(); } } /// /// 课程资料 /// [Required] [DisplayName("课程资料")] public Guid? CoursematerialID { get; set; } /// /// 课程资料代码 /// [DisplayName("课程资料代码")] public string CourseCode { get; set; } /// /// 课程名称 /// [DisplayName("课程名称")] public string CourseName { get; set; } /// /// 学分 /// [Required] [DisplayName("学分")] //[DisplayFormat(DataFormatString = "{0:#.0}")] //[RegularExpression(@"^\d+(\.\d+)?$", ErrorMessage = "请输整数或小数")] public decimal? Credit { get; set; } /// /// 课程学分 /// [DisplayName("学分")] public string CreditStr { get; set; } /// /// 开课学年 /// //[Required] [DisplayName("开课学年")] public int? SchoolyearNumID { get; set; } [DisplayName("开课学年")] public string SchoolyearNumNameStr { get; set; } /// /// 开课学年 /// [DisplayName("开课学年")] public string SchoolyearNumName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString()) .Where(x => x.Value == SchoolyearNumID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 学期 /// //[Required] [DisplayName("学期")] public int? SchoolcodeID { get; set; } [DisplayName("学期")] public string SchoolcodeStr { get; set; } /// /// 学期 /// [DisplayName("学期")] public string SchoolcodeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Semester.ToString()).Where(x => x.Value == SchoolcodeID).Select(x => x.Name).FirstOrDefault(); } } /// /// 教研室 /// [Required] [DisplayName("教研室")] public Guid? DepartmentID { get; set; } /// /// 教研室代码 /// [DisplayName("教研室代码")] public string DepartmentCode { get; set; } /// /// 教研室 /// [DisplayName("教研室")] public string DepartmentName { get; set; } /// /// 是否启用 /// [DisplayName("是否启用")] public bool IsEnable { get; set; } /// /// 是否启用 /// [DisplayName("是否启用")] public string IsEnableName { get; set; } /// /// 状态 /// [DisplayName("状态")] public int? RecordStatus { get; set; } public string RecordStatusStr { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_YesOrNoStatus.ToString()) .Where(x => x.Value == RecordStatus) .Select(x => x.Name).FirstOrDefault(); } } /// /// SOC个数 /// [DisplayName("SOC个数")] public int? SOCCount { get; set; } /// /// 处理方式 /// [DisplayName("处理方式")] public int? HandleModeID { get; set; } /// /// 处理方式 /// [DisplayName("处理方式")] public string HandleModeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HandleMode.ToString()) .Where(x => x.Value == HandleModeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 选修类型 /// public int? OptionalCourseTypeID { get; set; } } }