using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using EMIS.Entities; namespace EMIS.ViewModel.DQPSystem { public class SOCDetailView { /// /// 主键ID /// [DisplayName("主键ID")] public Guid SOCDetailID { get; set; } public Guid? EducationMissionID { get; set; } public string EducationMissionName { get; set; } /// /// 课程SOCID /// [DisplayName("课程SOCID")] public Guid? SOCID { get; set; } /// /// 教研室 /// [DisplayName("教研室")] public Guid? DepartmentID { get; set; } /// /// 学年学期ID /// [DisplayName("学年学期ID")] public Guid? SchoolyearID { get; set; } /// /// 学年学期 /// [DisplayName("学年学期")] public string SchoolyearCode { get; set; } /// /// 课程资料 /// [Required] [DisplayName("课程资料")] public Guid? CoursematerialID { get; set; } /// /// 课程资料代码 /// [DisplayName("课程资料代码")] public string CourseCode { get; set; } /// /// 课程名称 /// [DisplayName("课程名称")] public string CourseName { get; set; } /// /// 成果名称 /// [DisplayName("成果名称")] public string Name { get; set; } /// /// 成果学分 /// [DisplayName("成果学分")] //[DisplayFormat(DataFormatString = "{0:#.0}")] public decimal? Credit { get; set; } /// /// 成果权重 /// [DisplayName("成果权重")] //[RegularExpression(@"^([01](\.0+)?|0\.[0-9]+)$", ErrorMessage = "请输入小于1大于0的数字")] public decimal? Weight { get; set; } /// /// 成果描述 /// [DisplayName("成果描述")] public string Description { get; set; } /// /// 开始上传时间 /// [DisplayName("开始上传时间")] public DateTime? StartTime { get; set; } public string StartTimeStr { get { return StartTime == null ? "" : StartTime.Value.ToShortDateString(); } } /// /// 截止上传时间 /// [DisplayName("截止上传时间")] public DateTime? EndTime { get; set; } public string EndTimeStr { get { return EndTime == null ? "" : EndTime.Value.ToShortDateString(); } } /// /// 是否分组 /// [DisplayName("是否分组")] public bool? IsGroup { get; set; } public bool IsGroupin { get; set; } /// /// 是否分组 /// [DisplayName("是否分组")] public string IsGroupStr { get { return IsGroup == null ? "" : (IsGroup.Value ? "是" : "否"); } } /// /// 成果附件说明 /// [DisplayName("成果附件说明")] public string SOCDetailAttachment { get { string AttachmentName = string.Empty; if (Attachment != null) AttachmentName = string.Join("、", Attachment.Select(s => s.Name)); if (string.IsNullOrEmpty(AttachmentName)) { return ""; } else { return AttachmentName; } } } public int? IsChangeAttachment { get; set; } /// /// 分组数 /// [DisplayName("分组数")] public int? GroupCount { get; set; } /// /// 学生人数 /// [DisplayName("学生人数")] public int? StudentCount { get; set; } public IEnumerable AttachmentList { get; set; } public IEnumerable Attachment { get; set; } public string EducationMissionNameStr { get { if (string.IsNullOrEmpty(EducationMissionName)) { return ""; } else { return EducationMissionName.Replace(CourseName, "").Replace("-", ""); } } } } }