using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Bowin.Common.Utility; namespace EMIS.ViewModel.SupervisionManage { public class LessonRecordView { /// /// LessonRecordID /// public System.Guid LessonRecordID { get; set; } [Required] [DisplayName("学年学期")] public Guid? SchoolyearID { get; set; } public string SchoolyearCode { get; set; } public string SupervisionTypeDesc { get { return "督导听课"; } } [Required] [DisplayName("督导时间")] public Nullable LessonDate { get; set; } public string LessonDateDesc { get { return (LessonDate.HasValue ? LessonDate.Value.ToString("yyyy-MM-dd") : "") + WeekdayDesc + CoursesTimeDesc; } } [Required] [DisplayName("督导地点")] public string Location { get; set; } [Required] [DisplayName("督导院系")] public Nullable SupervisionCollegeID { get; set; } public string SupervisionCollegeName { get; set; } [Required] [DisplayName("督导对象")] public Nullable UserID { get; set; } public string UserName { get; set; } [DisplayName("授课班级")] public Nullable ClassmajorID { get; set; } public string ClassmajorName { get; set; } [Required] [DisplayName("课程名称")] public Nullable CoursematerialID { get; set; } public string CourseName { get; set; } [Required] [DisplayName("星期")] public Nullable Weekday { get; set; } public string WeekdayDesc { get { if (Weekday.HasValue) { return WeekHelper.WeekDictionary[Weekday.Value]; } else { return ""; } } } [Required] [DisplayName("节次")] public Nullable CoursesTimeID { get; set; } public Nullable StartTimes { get; set; } public Nullable EndTimes { get; set; } public string CoursesTimeDesc { get { return string.Format("第{0}-{1}节", StartTimes.HasValue ? StartTimes.Value.ToString() : "", EndTimes.HasValue ? EndTimes.Value.ToString() : ""); } } [Required] [DisplayName("评分(0-100)")] [RegularExpression(@"^\d+(\.\d{1,2})?$", ErrorMessage = "请输整数或保留2位小数")] [DisplayFormat(DataFormatString = "#0.##")] public Nullable TotalScore { get; set; } [Required] [DisplayName("督导情况记录")] //[MinLength(100, ErrorMessage = "字数不够")] public string Content { get; set; } [Required] [DisplayName("督导评价建议")] //[MinLength(60, ErrorMessage = "字数不够")] public string Record { get; set; } [Required] [DisplayName("督导员")] public Nullable CreateUserID { get; set; } public string CreateUserName { get; set; } public Nullable CollegeID { get; set; } } }