using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using EMIS.ViewModel.CacheManage; namespace EMIS.ViewModel.SelectCourse { public class ExecutableFreeSelectionCouseSchedulingView { public string DefaultClassName { get; set; } /// /// CourseProcessID /// [DisplayName("ID")] public System.Guid SchedulingID { get; set; } /// /// EducationSchedulingClassID /// public Guid? SchoolyearID { get; set; } [DisplayName("任选ID")] public Nullable ID { get; set; } [DisplayName("任务班名称")] public string ClassName { get; set; } public Guid? CourseCollegeID { get; set; } public Guid? CoursesTimeID { get; set; } /// /// 时间节段 /// [Required] [DisplayName("时间节段")] public int? TimesSegment { get; set; } /// /// 时间节段 /// [DisplayName("时间节段")] public string TimesSegmentName { get; set; } /// /// 授课方式 /// [DisplayName("授课方式")] public int? TeachingModeID { get; set; } /// /// 授课方式 /// [DisplayName("授课方式")] public string TeachingModeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString()) .Where(x => x.Value == TeachingModeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// Week /// [Required] [DisplayName("周次")] public Nullable Week { get; set; } /// /// Times /// [Required] [DisplayName("学时")] public Nullable StartTimes { get; set; } public Nullable EndTimes { get; set; } public string Times { get { if (StartTimes == EndTimes) { return StartTimes.Value.ToString(); } return StartTimes.Value.ToString() + "-" + EndTimes.Value.ToString(); } } /// /// ClassroomTypeID /// [DisplayName("教室类型")] public Nullable ClassroomTypeID { get; set; } [DisplayName("教室类型")] public string ClassroomTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ClassroomType.ToString()) .Where(x => x.Value == ClassroomTypeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// ClassroomTypeID /// [DisplayName("教室")] public Nullable ClassroomID { get; set; } [DisplayName("教室")] public string ClassroomName { get; set; } /// /// 星期 /// public Nullable Weekday { get; set; } public string WeekdayName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.ES_WeekDay.ToString()) .Where(x => x.Value == Weekday) .Select(x => x.Name).FirstOrDefault(); } } public string WeekdayName1 { get; set; } [DisplayName("上课时间")] public string WeekdayTimesSegmentName { get; set; } /// /// 开始周次 /// [DisplayName("开始周次")] [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")] public int? StartWeeklyNum { get; set; } /// /// 结束周次 /// [DisplayName("结束周次")] [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")] public int? EndWeeklyNum { get; set; } /// /// RecordStatus /// public Nullable RecordStatus { get; set; } /// /// CreateTime /// public Nullable CreateTime { get; set; } /// /// CreateUserID /// public Nullable CreateUserID { get; set; } /// /// ModifyUserID /// public Nullable ModifyUserID { get; set; } /// /// ModifyTime /// public Nullable ModifyTime { get; set; } } }