using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using EMIS.Entities; using EMIS.ViewModel.CacheManage; namespace EMIS.ViewModel.TeachingMaterial { public class TeachersOrderView { /// /// 教师征订ID /// [DisplayName("教师征订ID")] public Guid TeachersOrderID { get; set; } /// /// 学年学期 /// /// [Required] [DisplayName("学年学期")] [Required] public Guid? SchoolyearID { get; set; } [DisplayName("学年学期")] public string SchoolyearName { get; set; } /// /// 院系所ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")] [Required] public Guid? CollegeID { get; set; } /// /// 院系所 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")] public string CollegeName { get; set; } /// /// 教材总库ID /// [DisplayName("教材总库ID")] [Required] public Guid TeachingMaterialPoolID { get; set; } /// /// 课程ID /// [DisplayName("课程")] public HashSet CoursematerialEntityList { get; set; } /// /// 课程名称 /// [DisplayName("课程名称")] public string CoursematerialName { get { return string.Join(",", CoursematerialEntityList.Select(x => x.CourseName)); } } /// /// 课程类型 /// [DisplayName("课程类型")] public string CoursematerialTypeName { get; set; } /// /// 课程类型 /// [DisplayName("课程类型")] public int? CoursematerialType { get; set; } /// /// 课程代码 /// [DisplayName("课程代码")] public string CoursematerialCode { get { return string.Join(",", CoursematerialEntityList.Select(x => x.CourseCode)); } } /// /// 课程级别 /// [DisplayName("课程级别")] public string CoursematerialLevelName { get; set; } /// /// 课程级别 /// [DisplayName("课程级别")] public int? CoursematerialLevel { get; set; } /// /// 教材编号 /// [DisplayName("教材编号")] public string TeachingMaterialCode { get; set; } /// /// 教材名称 /// [DisplayName("教材名称")] public string TeachingMaterialName { get; set; } /// ///教材类型 /// [DisplayName("教材类型")] public int? TeachingMaterialTypeID { get; set; } /// ///教材类型 /// [DisplayName("教材类型")] public string TeachingMaterialTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMaterialType.ToString()) .Where(x => x.Value == TeachingMaterialTypeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 版本时间 /// [DisplayName("版本时间")] public string PublishTime { get; set; } /// /// 出版单位ID /// [DisplayName("出版单位ID")] public Guid? PublishID { get; set; } /// /// 出版单位 /// [DisplayName("出版单位")] public string PublishName { get; set; } /// /// 作者 /// [DisplayName("作者")] public string Author { get; set; } /// ///征订数量 /// [DisplayName("征订数量")] [Required] public int? OrderQty { get; set; } /// /// 征订人ID /// [DisplayName("征订人ID")] public Guid OrderUserID { get; set; } /// /// 征订人编号 /// [DisplayName("征订人编号")] public string OrderLoginID { get; set; } /// /// 征订人 /// [DisplayName("征订人")] public string OrderUserName { get; set; } /// /// 征订日期 /// [DisplayName("征订日期")] public DateTime? OrderDate { get; set; } /// /// 征订说明 /// [DisplayName("征订说明")] public string OrderDesc { get; set; } /// /// 审核状态 /// [DisplayName("审核状态")] public int ApproveStatus { get; set; } /// /// 审核状态 /// [DisplayName("审核状态")] public string ApproveStatusName { get; set; } /// /// 创建时间 /// [DisplayName("审核状态")] public DateTime? CreateTime { get; set; } public Guid? CreateUserID { get; set; } /// /// ISBN /// [DisplayName("ISBN")] [Required] public string ISBN { get; set; } /// /// 单价 /// [DisplayName("单价")] [Required] public decimal? Price { get; set; } } }