using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel.DataAnnotations; using System.ComponentModel; using EMIS.ViewModel.CacheManage; namespace EMIS.ViewModel.SelectCourse { public class FreeSelectionCourseView { /// /// 任选课程ID /// public System.Guid FreeSelectionCouseID { get; set; } /// /// 教研室ID /// [Required] [DisplayName("教研室ID")] public Nullable DepartmentID { get; set; } /// /// 教研室 /// [DisplayName("教研室")] public string DepartmentName { 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 = "College")] public string CollegeName { get; set; } /// /// 选课编号 /// [Required] [DisplayName("选课编号")] public string No { get; set; } /// /// 课程信息ID /// [Required] [DisplayName("课程信息ID")] public Nullable CoursematerialID { get; set; } /// /// 课程代码 /// [DisplayName("课程代码")] public string CourseCode { get; set; } /// /// 课程名称 /// [DisplayName("课程名称")] public string CourseName { get; set; } /// /// 课程类型 /// [Required] [DisplayName("课程类型")] public Nullable CourseTypeID { get; set; } /// /// 课程类型 /// public string CourseTypeName { get; set; } /// /// 课程结构 /// //[Required] [DisplayName("课程结构")] public Nullable CourseStructureID { get; set; } /// /// 课程结构 /// [DisplayName("课程结构")] public string CourseStructureName { get; set; } /// /// 课程属性 /// [DisplayName("课程属性")] public Nullable CourseCategoryID { get; set; } /// /// 课程属性 /// [DisplayName("课程属性")] public string CourseCategoryName { get; set; } /// /// 课程性质 /// [DisplayName("课程性质")] public Nullable CourseQualityID { get; set; } /// /// 课程性质 /// [DisplayName("课程性质")] public string CourseQualityName { get; set; } /// /// 实践类型 /// [DisplayName("实践类型")] public int? PracticeTypeID { get; set; } /// /// 实践类型 /// [DisplayName("实践类型")] public string PracticeTypeNameStr { get; set; } /// /// 实践类型 /// [DisplayName("实践类型")] public string PracticeTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.EM_PracticeType.ToString()) .Where(x => x.Value == PracticeTypeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 考试方式 /// [Required] [DisplayName("考试方式")] public Nullable ExaminationModeID { get; set; } /// /// 考试方式 /// [DisplayName("考试方式")] public string ExaminationModeName { get; set; } /// /// 成绩类型 /// [Required] [DisplayName("成绩类型")] public int? ResultTypeID { get; set; } /// /// 授课语言 /// [DisplayName("授课语言")] public Nullable TeachinglanguageID { get; set; } /// /// 授课语言 /// [DisplayName("授课语言")] public string TeachinglanguageName { get; set; } /// /// 授课方式 /// [DisplayName("授课方式")] public List TeachingModeID { get; set; } /// /// 授课方式 /// [DisplayName("授课方式")] public string TeachingModeName { get; set; } /// /// 开课学年 /// [DisplayName("开课学年")] public Nullable SchoolyearNumID { get; set; } /// /// 开课学年 /// [DisplayName("开课学年")] public string SchoolyearNumName { get; set; } /// /// 学期 /// [DisplayName("学期")] public Nullable SchoolcodeID { get; set; } /// /// 学期 /// [DisplayName("学期")] public string SchoolcodeName { get; set; } /// /// 开课学期 /// [DisplayName("开课学期")] public Nullable StarttermID { get; set; } /// /// 开课学期 /// [DisplayName("开课学期")] public string StarttermName { get; set; } /// /// 学分 /// [Required] [DisplayName("学分")] [RegularExpression(@"^(([1-9]+)|([0-9]+\.[0-9]{1,2}))$", ErrorMessage = "请输整数或保留2位小数")] public decimal Credit { get; set; } /// /// 总学时 /// [DisplayName("总学时")] [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")] public int? Totalhours { get; set; //get //{ // return ((TheoryCourse ?? 0) + (Practicehours ?? 0) + (Trialhours ?? 0)); //} } /// /// 理论学时 /// [Required] [DisplayName("理论学时")] [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")] public int? TheoryCourse { get; set; } /// /// 实践学时 /// [Required] [DisplayName("实践学时")] [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")] public int? Practicehours { get; set; } /// /// 实验学时 /// [Required] [DisplayName("实验学时")] [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")] public int? Trialhours { get; set; } /// /// 上课周数 /// [DisplayName("上课周数")] public int? SchoolweeksNum { get { return (TheoryWeeklyNum ?? 0) + (PracticeWeeklyNum ?? 0) + (TrialWeeklyNum ?? 0); } } /// /// 每周次数 /// [Required] [DisplayName("每周次数")] [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")] public int? WeeklyNum { get; set; } /// /// 理论周次 /// [Required] [DisplayName("理论周次")] [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")] public int? TheoryWeeklyNum { get; set; } /// /// 实践周次 /// [Required] [DisplayName("实践周次")] [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")] public int? PracticeWeeklyNum { get; set; } /// /// 实验周次 /// [Required] [DisplayName("实验周次")] [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")] public int? TrialWeeklyNum { get; set; } /// /// 开始周次 /// [DisplayName("开始周次")] [Required] [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")] public int? StartWeeklyNum { get; set; } /// /// 结束周次 /// [Required] [DisplayName("结束周次")] [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")] public int? EndWeeklyNum { get; set; } /// /// 周学时 /// [Required] [DisplayName("周学时")] [RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")] public int? WeeklyHours { get; set; } /// /// 起止周次 /// public string StartEndWeeklyNum { get { return (this.StartWeeklyNum.HasValue && this.EndWeeklyNum.HasValue) ? (this.StartWeeklyNum.Value.ToString() + "-" + this.EndWeeklyNum.Value.ToString()) : ""; } } ///// ///// 授课地点 ///// //[DisplayName("授课地点")] //public List TeachingPlaceID { get; set; } ///// ///// 授课地点 ///// //[DisplayName("授课地点")] //public string TeachingPlaceStr { get; set; } /// /// 是否启用 /// [DisplayName("是否启用")] public bool IsEnable { get; set; } /// /// 是否启用 /// [DisplayName("是否启用")] public string IsEnableDesc { get { return IsEnable == true ? "是" : "否"; } } /// /// 备注 /// [DisplayName("备注")] public string Remark { 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; } } }