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.Cultureplan { public class CoursematerialView { /// /// 主键ID /// [DisplayName("主键ID")] public Guid CoursematerialID { get; set; } /// /// 课程代码 /// [Required] [DisplayName("课程代码")] [RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入数字或英文字母")] public string CourseCode { get; set; } /// /// 课程名称 /// [Required] [DisplayName("课程名称")] public string CourseName { get; set; } /// /// 课程简称 /// [DisplayName("课程简称")] public string Abbreviation { get; set; } /// /// 英文名称 /// [DisplayName("英文名称")] public string EnglishName { get; set; } /// /// 课程规范名 /// [DisplayName("课程规范名")] public string StandardName { get; set; } /// /// 课程版本 /// [DisplayName("课程版本")] public string CourseEdition { get; set; } /// /// 课程级别 /// [DisplayName("课程级别")] public int? CourseLevelID { get; set; } /// /// 课程级别(Excel导入) /// [DisplayName("课程级别")] public string CourseLevelStr { get; set; } /// /// 课程级别 /// [DisplayName("课程级别")] public string CourseLevelName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseLevel.ToString()) .Where(x => x.Value == CourseLevelID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 课程科类 /// [DisplayName("课程科类")] public int? CourseScienceID { get; set; } /// /// 课程科类(Excel导入) /// [DisplayName("课程科类")] public string CourseScienceStr { get; set; } /// /// 课程科类 /// [DisplayName("课程科类")] public string CourseScienceName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseScience.ToString()) .Where(x => x.Value == CourseScienceID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 上课类型ID /// [DisplayName("上课类型ID")] public Guid? ClassGroupingID { get; set; } /// /// 上课类型 /// [DisplayName("上课类型")] public string ClassName { get; set; } /// /// 课程简介 /// [DisplayName("课程简介")] public string CourseSynopsis { get; set; } /// /// 预修课程集 /// [DisplayName("预修课程集")] public string CourseReserve { get; set; } /// /// 是否启用 /// [DisplayName("是否启用")] public bool IsEnable { get; set; } /// /// 是否启用(Excel导入用) /// [DisplayName("是否启用")] public string IsEnableStr { get; set; } /// /// 是否启用 /// [DisplayName("是否启用")] public string IsEnableName { get { return IsEnable == true ? "是" : "否"; } } /// /// 备注 /// [DisplayName("备注")] public string Remark { get; set; } /// /// 错误信息(Excel导入) /// [DisplayName("未导入原因")] public string ErrorMessage { get; set; } /// /// 状态 /// [DisplayName("状态")] public int? RecordStatus { get; set; } /// /// 创建人 /// [DisplayName("创建人")] public Guid? CreateUserID { get; set; } /// /// 创建时间 /// [DisplayName("创建时间")] public DateTime? CreateTime { get; set; } /// /// 修改人 /// [DisplayName("修改人")] public Guid? ModifyUserID { get; set; } /// /// 修改时间 /// [DisplayName("修改时间")] public DateTime? ModifyTime { get; set; } } }