using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel.DataAnnotations; using System.ComponentModel; using EMIS.ViewModel.CacheManage; using EMIS.Entities; namespace EMIS.ViewModel.ExaminationManage { public class StudentExaminationCourseView { /// /// ExaminationPlanID /// public System.Guid ExaminationPlanID { get; set; } [DisplayName("学年学期")] public Nullable SchoolyearID { get; set; } public string SchoolyearCode { get; set; } [DisplayName("考试科目")] public Nullable CoursematerialID { get; set; } public string CoursematerialName { get; set; } [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")] public Guid? CollegeID { get; set; } public string CollegeName { get; set; } [DisplayName("考试方式")] public Nullable ExaminationModeID { get; set; } public string ExaminationModeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString()) .Where(x => x.Value == ExaminationModeID) .Select(x => x.Name).FirstOrDefault(); } } [DisplayName("考试形式")] public Nullable ExaminationStyleID { get; set; } public string ExaminationStyleName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.EX_ExaminationStyle.ToString()) .Where(x => x.Value == ExaminationStyleID) .Select(x => x.Name).FirstOrDefault(); } } [DisplayName("考试性质")] public Nullable ExamsCategoryID { get; set; } public string ExamsCategoryName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsCategory.ToString()) .Where(x => x.Value == ExamsCategoryID) .Select(x => x.Name).FirstOrDefault(); } } public Nullable EducationMissionID { get; set; } [DisplayName("考试日期")] public Nullable ExaminationDate { get; set; } [DisplayName("开始时间")] public Nullable StartTime { get; set; } public string StartTimeStr { get { if (StartTime.HasValue) { if (StartTime.Value.Minutes == 0) { return StartTime.Value.Hours + ":00"; } else { return StartTime.Value.Hours + ":" + StartTime.Value.Minutes; } } else { return null; } } } [DisplayName("结束时间")] public Nullable EndTime { get; set; } public string EndTimeStr { get { if (EndTime.HasValue) { if (EndTime.Value.Minutes == 0) { return EndTime.Value.Hours + ":00"; } else { return EndTime.Value.Hours + ":" + EndTime.Value.Minutes; } } else { return null; } } } public string ExaminationTime { get { return (StartTime.HasValue && EndTime.HasValue) ? StartTime.Value.ToString("hh\\:mm") + "-" + EndTime.Value.ToString("hh\\:mm") : ""; } } /// /// 课程结束周次 /// public int? CourseEndWeekNum { get; set; } //public CF_Classroom CF_Classroom { get; set; } public string ClassroomNames { get; set; } /// /// RecordStatus /// public Nullable RecordStatus { get; set; } public string RecordStatusDesc { get { return IdNameExt.GetDictionaryItem(DictionaryItem.EX_ExaminationPlanStatus.ToString()) .Where(x => x.Value == RecordStatus) .Select(x => x.Name).FirstOrDefault(); } } /// CreateTime /// public Nullable CreateTime { get; set; } /// /// CreateUserID /// public Nullable CreateUserID { get; set; } /// /// ModifyUserID /// public Nullable ModifyUserID { get; set; } /// /// ModifyTime /// public Nullable ModifyTime { get; set; } } }