using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; using EMIS.ViewModel.CacheManage; using EMIS.ViewModel.EducationManagement; using EMIS.Entities; using System.ComponentModel.DataAnnotations; namespace EMIS.ViewModel.EducationManage { public class EducationMissionClassCheckView { /// /// 教学检查ID /// [Required] [DisplayName("教学检查ID")] public Guid EducationMissionClassCheckID { get; set; } /// /// 排课周次ID /// [DisplayName("排课周次ID")] public Guid? EducationSchedulingWeekNumID { get; set; } /// /// 院系所ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")] public Guid? CollegeID { get; set; } /// /// 院系所代码 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")] public string CollegeNo { get; set; } /// /// 院系所名称 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")] public string CollegeName { get; set; } /// /// 任务班ID /// [Required] [DisplayName("任务班")] public Guid? EducationMissionClassID { get; set; } /// /// 任务班名称 /// [DisplayName("任务班名称")] public string EducationMissionClassName { get; set; } /// /// 排课课表ID /// [DisplayName("排课课表ID")] public Guid? EducationSchedulingID { get; set; } /// /// 学年学期ID /// [Required] [DisplayName("学年学期")] public Guid? SchoolyearID { get; set; } /// /// 学年学期 /// [DisplayName("学年学期")] public string SchoolyearCode { get; set; } /// /// 课程信息ID /// [Required] [DisplayName("课程")] public Guid? CoursematerialID { get; set; } /// /// 课程代码 /// [DisplayName("课程代码")] public string CourseCode { get; set; } /// /// 课程名称 /// [DisplayName("课程名称")] public string CourseName { get; set; } /// /// 教师ID /// public List UserID { get; set; } /// /// 教师姓名 /// [DisplayName("授课老师")] public string TeacherName { get { string name = string.Empty; if (MissionClassTeacherView != null) name = string.Join(",", MissionClassTeacherView.Select(s => s.Name)); if (string.IsNullOrEmpty(name)) { return ""; } else { return name; } } } [DisplayName("授课老师集合")] public IEnumerable MissionClassTeacherView { get; set; } /// /// 周次 /// [Required] [DisplayName("周次")] public int? WeekNum { get; set; } /// /// 星期 /// [Required] [DisplayName("星期")] public int? Weekday { get; set; } /// /// 星期 /// [DisplayName("星期")] public string WeekdayName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.ES_WeekDay.ToString()) .Where(x => x.Value == Weekday) .Select(x => x.Name).FirstOrDefault(); } } /// /// 课程时间 /// [Required] [DisplayName("节次")] public Guid? CoursesTimeID { get; set; } /// /// 开始节次 /// [DisplayName("开始节次")] public int StartTimes { get; set; } /// /// 结束节次 /// [DisplayName("结束节次")] public int EndTimes { get; set; } /// /// 节次 /// [DisplayName("节次")] public string Times { get { if (StartTimes == EndTimes) { return StartTimes.ToString(); } else { return StartTimes.ToString() + "-" + EndTimes.ToString(); } } } /// /// 时间节段 /// public int TimesSegment { get; set; } /// /// TimesSegment /// public string TimesSegmentName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TimesSegment.ToString()) .Where(x => x.Value == TimesSegment) .Select(x => x.Name).FirstOrDefault(); } } /// /// 教室ID /// [Required] [DisplayName("场地")] public Guid? ClassroomID { get; set; } /// /// 教室编号 /// [DisplayName("教室编号")] public string ClassroomCode { get; set; } /// /// 教室名称 /// [DisplayName("教室名称")] public string ClassroomName { get; set; } /// /// 学生情况 /// [DisplayName("学生情况")] public string StudentComment { get; set; } /// /// 教师情况 /// [DisplayName("教师情况")] public string TeacherComment { get; set; } /// /// 设备及其他情况 /// [DisplayName("设备及其他情况")] public string DeviceComment { get; set; } /// /// 检查方式 /// [DisplayName("检查方式")] public int? CheckWayID { get; set; } /// /// 检查方式 /// [DisplayName("检查方式")] public string CheckWayName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.EM_EducationMissionClassCheckWay.ToString()) .Where(x => x.Value == CheckWayID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 处理意见 /// [DisplayName("处理意见")] public int? OpinionID { get; set; } /// /// 处理意见 /// [DisplayName("处理意见")] public string OpinionName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.EM_EducationMissionClassCheckOpinion.ToString()) .Where(x => x.Value == OpinionID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 检查人员 /// [DisplayName("检查人员")] public IEnumerable Sys_User { get; set; } /// /// 检查人员姓名 /// [DisplayName("检查人员姓名")] public string CheckPersonName { get { string name = string.Empty; if (Sys_User != null) name = string.Join(",", Sys_User.Select(s => s.Name)); if (string.IsNullOrEmpty(name)) { return ""; } else { return name; } } } /// /// 备注 /// [DisplayName("备注")] public string Remark { get; set; } } }