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.EducationManagement { public class ExecutablePlanView { /// /// 主键ID /// [DisplayName("主键ID")] public Guid ExecutablePlanID { get; set; } /// /// 计划来源 /// [Required] [DisplayName("计划来源")] public int? SourceTypeID { get; set; } /// /// 计划来源 /// [DisplayName("计划来源")] public string SourceTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.EM_SourceType.ToString()) .Where(x => x.Value == SourceTypeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 默认班级名称 /// [Required] [DisplayName("默认班级名称")] public string DefaultClassName { get; set; } /// /// 专业计划ID /// [DisplayName("专业计划ID")] public Guid? SpecialtyPlanID { get; set; } /// /// 学年学期 /// [Required] [DisplayName("学年学期")] public Guid? SchoolyearID { get; set; } /// /// 学年学期 /// [DisplayName("学年学期")] public string SchoolyearCode { get; set; } /// /// 学年学期对应的学年 /// [DisplayName("学年")] public int? YearID { get; set; } /// /// 学年学期对应的Value值 /// [DisplayName("Value")] public int? Value { get; set; } /// /// 开课学年 /// [Required] [DisplayName("开课学年")] public int? SchoolyearNumID { get; set; } /// /// 开课学年 /// [DisplayName("开课学年")] public string SchoolyearNumName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString()) .Where(x => x.Value == SchoolyearNumID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 学期 /// [Required] [DisplayName("学期")] public int? SchoolcodeID { get; set; } /// /// 学期 /// [DisplayName("学期")] public string SchoolcodeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Semester.ToString()).Where(x => x.Value == SchoolcodeID).Select(x => x.Name).FirstOrDefault(); } } /// /// 开课学期 /// [Required] [DisplayName("开课学期")] public int? StarttermID { get; set; } /// /// 开课学期 /// [DisplayName("开课学期")] public string StarttermName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Startterm.ToString()) .Where(x => x.Value == StarttermID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 年级专业ID /// [Required] [DisplayName("年级专业")] public Guid? GrademajorID { get; set; } /// /// 年级专业编号 /// [DisplayName("年级专业编号")] public string GrademajorCode { get; set; } /// /// 年级专业名称 /// [DisplayName("年级专业名称")] public string GrademajorName { get; set; } /// /// 年级专业对应年级(入学学年) /// [Required] [DisplayName("年级")] public int? GradeID { get; set; } /// /// 院系专业ID /// [DisplayName("院系专业ID")] public Guid? FacultymajorID { get; set; } /// /// 院系专业编号 /// [DisplayName("院系专业编号")] public string FacultymajorCode { get; set; } /// /// 院系专业名称 /// [DisplayName("院系专业名称")] public string FacultymajorName { get; set; } /// /// 院系所ID /// [Required] [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")] public Guid? CollegeID { get; set; } /// /// 院系所代码 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")] public string CollegeCode { get; set; } /// /// 院系所 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")] public string CollegeName { get; set; } /// /// 校区ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusID")] public Guid? CampusID { get; set; } /// /// 校区代码 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusCode")] public string CampusNo { get; set; } /// /// 校区名称 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CampusName")] public string CampusName { get; set; } /// /// 入学学年学期ID /// [Required] [DisplayName("入学学年学期ID")] public Guid? StartSchoolyearID { get; set; } /// /// 入学学年学期 /// [DisplayName("入学学年学期")] public string StartSchoolyearCode { get; set; } /// /// 入学学年学期对应的Value值 /// [DisplayName("StartValue")] public int? StartValue { get; set; } /// /// 入学学期 /// [Required] [DisplayName("入学学期")] public int? StartSchoolcodeID { get; set; } /// /// 入学学期 /// [DisplayName("入学学期")] public string StartSchoolcodeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Semester.ToString()).Where(x => x.Value == StartSchoolcodeID).Select(x => x.Name).FirstOrDefault(); } } /// /// 毕业学期ID /// [Required] [DisplayName("毕业学期ID")] public Guid? GraduatingSemesterID { get; set; } /// /// 毕业学期 /// [DisplayName("毕业学期")] public string GraduatingSemesterCode { get; set; } /// /// 毕业学期对应的Value值 /// [DisplayName("GraduatingSemesterValue")] public int? GraduatingSemesterValue { get; set; } /// /// 专业信息ID /// [Required] [DisplayName("专业信息ID")] public Guid? SpecialtyID { get; set; } /// /// 专业ID(Value) /// [DisplayName("专业ID(Value)")] public int? StandardID { get; set; } /// /// 专业代码 /// [DisplayName("专业代码")] public string StandardCode { get { var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString()) .Where(x => x.Value == StandardID) .Select(x => x.Code).FirstOrDefault(); return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : ""); } } /// /// 专业名称 /// [DisplayName("专业名称")] public string StandardName { get; set; } /// /// 培养层次 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")] public int? EducationID { get; set; } /// /// 培养层次 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")] public string EducationName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString()) .Where(x => x.Value == EducationID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 学习形式 /// [DisplayName("学习形式")] public int? LearningformID { get; set; } /// /// 学习形式 /// [DisplayName("学习形式")] public string LearningformName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString()) .Where(x => x.Value == LearningformID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 学制 /// [DisplayName("学制")] public decimal? LearnSystem { get; set; } /// /// 课程信息ID /// [Required] [DisplayName("课程信息ID")] public Guid? CoursematerialID { get; set; } /// /// 课程代码 /// [DisplayName("课程代码")] public string CourseCode { get; set; } /// /// 课程名称 /// [DisplayName("课程名称")] public string CourseName { get; set; } /// /// 上课类型ID /// [DisplayName("上课类型ID")] public Guid? ClassGroupingID { get; set; } /// /// 上课类型 /// [DisplayName("上课类型")] public string ClassGroupingName { get; set; } /// /// 课程结构 /// [DisplayName("课程结构")] public int? CourseStructureID { get; set; } /// /// 课程结构 /// [DisplayName("课程结构")] public string CourseStructureName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseStructure.ToString()) .Where(x => x.Value == CourseStructureID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 课程属性 /// [DisplayName("课程属性")] public int? CourseCategoryID { get; set; } /// /// 课程属性 /// [DisplayName("课程属性")] public string CourseCategoryName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseCategory.ToString()) .Where(x => x.Value == CourseCategoryID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 课程类型 /// [Required] [DisplayName("课程类型")] public int? CourseTypeID { get; set; } /// /// 课程类型 /// [DisplayName("课程类型")] public string CourseTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseType.ToString()) .Where(x => x.Value == CourseTypeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 课程性质 /// [DisplayName("课程性质")] public int? CourseQualityID { get; set; } /// /// 课程性质 /// [DisplayName("课程性质")] public string CourseQualityName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseQuality.ToString()) .Where(x => x.Value == CourseQualityID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 课程学分 /// [Required] [DisplayName("课程学分")] //[DisplayFormat(DataFormatString = "{0:N1}")] [RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")] public decimal? Credit { get; set; } /// /// 理论学时 /// [Required] [DisplayName("理论学时")] [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")] public int? TheoryCourse { get; set; } /// /// 实践学时 /// [Required] [DisplayName("实践学时")] [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")] public int? Practicehours { get; set; } /// /// 实验学时 /// [Required] [DisplayName("实验学时")] //[Compare("Practicehours")] [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")] public int? Trialhours { get; set; } /// /// 总学时 /// [Required] [DisplayName("总学时")] [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")] public int? Totalhours { get; set; } /// /// 理论周次 /// [Required] [DisplayName("理论周次")] [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")] public int? TheoryWeeklyNum { get; set; } /// /// 实践周次 /// [Required] [DisplayName("实践周次")] [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")] public int? PracticeWeeklyNum { get; set; } /// /// 实验周次 /// [Required] [DisplayName("实验周次")] [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")] public int? TrialWeeklyNum { get; set; } /// /// 总周次 /// [Required] [DisplayName("总周次")] [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")] public int? SchoolweeksNum { get; set; } /// /// 周学时 /// [Required] [DisplayName("周学时")] [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")] public int? WeeklyHours { get; set; } /// /// 每周次数 /// [Required] [DisplayName("每周次数")] [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")] public int? WeeklyNum { get; set; } /// /// 开始周次 /// [Required] [DisplayName("开始周次")] [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")] public int? StartWeeklyNum { get; set; } /// /// 结束周次 /// [Required] [DisplayName("结束周次")] [RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")] public int? EndWeeklyNum { get; set; } /// /// 起止周次 /// [DisplayName("起止周次")] public string StartEndWeeklyNum { get; set; } /// /// 开课教研室ID /// [Required] [DisplayName("开课教研室")] public Guid? DepartmentID { get; set; } /// /// 开课教研室代码 /// [DisplayName("开课教研室代码")] public string DepartmentCode { get; set; } /// /// 开课教研室 /// [DisplayName("开课教研室")] public string DepartmentName { get; set; } /// /// 开课院系ID /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CourseCollege")] public Guid? CourseCollegeID { get; set; } /// /// 开课院系代码 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CourseCollege")] public string CourseCollegeCode { get; set; } /// /// 开课院系 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CourseCollege")] public string CourseCollegeName { get; set; } /// /// 是否专业核心 /// [Required] [DisplayName("是否专业核心")] public bool IsSpecialtycore { get; set; } /// /// 是否专业核心 /// [DisplayName("是否专业核心")] public string IsSpecialtycoreName { get { return this.IsSpecialtycore != true ? "否" : "是"; } } /// /// 是否合作开发 /// [Required] [DisplayName("是否合作开发")] public bool IsCooperation { get; set; } /// /// 是否合作开发 /// [DisplayName("是否合作开发")] public string IsCooperationName { get { return this.IsCooperation != true ? "否" : "是"; } } /// /// 是否必修课 /// [Required] [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "IsRequired")] public bool IsRequired { get; set; } /// /// 是否必修课 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "IsRequired")] public string IsRequiredName { get { return this.IsRequired != true ? "否" : "是"; } } /// /// 是否网上选修 /// [Required] [DisplayName("是否网上选修")] public bool IsElective { get; set; } /// /// 是否网上选修 /// [DisplayName("是否网上选修")] public string IsElectiveName { get { return this.IsElective != true ? "否" : "是"; } } /// /// 是否网络课程 /// [Required] [DisplayName("是否网络课程")] public bool IsNetworkCourse { get; set; } /// /// 是否网络课程 /// [DisplayName("是否网络课程")] public string IsNetworkCourseName { get { return this.IsNetworkCourse != true ? "否" : "是"; } } /// /// 是否学位课程 /// [Required] [DisplayName("是否学位课程")] public bool IsMainCourse { get; set; } /// /// 是否学位课程 /// [DisplayName("是否学位课程")] public string IsMainCourseName { get { return this.IsMainCourse != true ? "否" : "是"; } } /// /// 是否需要教材 /// [DisplayName("是否需要教材")] public bool IsNeedMaterial { get; set; } /// /// 是否需要教材 /// [DisplayName("是否需要教材")] public string IsNeedMaterialName { get { return this.IsNeedMaterial != true ? "否" : "是"; } } /// /// 精品课程 /// [DisplayName("精品课程")] public int? CourseFineID { get; set; } /// /// 精品课程 /// [DisplayName("精品课程")] public string CourseFineName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseFine.ToString()) .Where(x => x.Value == CourseFineID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 实践类型 /// [DisplayName("实践类型")] public int? PracticeTypeID { get; set; } /// /// 实践类型 /// [DisplayName("实践类型")] public string PracticeTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.EM_PracticeType.ToString()) .Where(x => x.Value == PracticeTypeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 授课语言 /// [DisplayName("授课语言")] public int? TeachinglanguageID { get; set; } /// /// 授课语言 /// [DisplayName("授课语言")] public string TeachinglanguageName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Teachinglanguage.ToString()) .Where(x => x.Value == TeachinglanguageID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 考试方式 /// [Required] [DisplayName("考试方式")] public int? ExaminationModeID { get; set; } /// /// 考试方式 /// [DisplayName("考试方式")] public string ExaminationModeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString()) .Where(x => x.Value == ExaminationModeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 成绩类型 /// [Required] [DisplayName("成绩类型")] public int? ResultTypeID { get; set; } /// /// 成绩类型 /// [DisplayName("成绩类型")] public string ResultTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ResultType.ToString()) .Where(x => x.Value == ResultTypeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 处理方式 /// [Required] [DisplayName("处理方式")] public int? HandleModeID { get; set; } /// /// 处理方式 /// [DisplayName("处理方式")] public string HandleModeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HandleMode.ToString()) .Where(x => x.Value == HandleModeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 授课方式 /// [DisplayName("授课方式")] public List TeachingModeIDList { get; set; } /// /// 授课方式(可存在多个授课方式--用顿号隔开) /// [DisplayName("授课方式")] public string TeachingModeIDListName { get { if (TeachingModeIDList != null && TeachingModeIDList.Count() > 0) { return string.Join("、", TeachingModeIDList.Select(x => IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString()) .Where(w => w.Value == x).Select(w => w.Name).FirstOrDefault())); } else { return ""; } } } /// /// 授课地点 /// [DisplayName("授课地点")] public List TeachingPlaceIDList { get; set; } /// /// 授课地点(可存在多个授课地点--用顿号隔开) /// [DisplayName("授课地点")] public string TeachingPlaceIDListName { get { if (TeachingPlaceIDList != null && TeachingPlaceIDList.Count() > 0) { return string.Join("、", TeachingPlaceIDList.Select(x => IdNameExt.GetDictionaryItem(DictionaryItem.EM_TeachingPlace.ToString()) .Where(w => w.Value == x).Select(w => w.Name).FirstOrDefault())); } else { return ""; } } } /// /// 计划范围 /// [DisplayName("计划范围")] public int? PlanRange { get; set; } /// /// 人数 /// [DisplayName("人数")] public int? StudentCount { get; set; } /// /// 计划类型 /// [DisplayName("计划类型")] public int? PlanTypeID { get; set; } /// /// 计划类型 /// [DisplayName("计划类型")] public string PlanTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.EM_PlanType.ToString()) .Where(x => x.Value == PlanTypeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 执行状态 /// [DisplayName("执行状态")] public int? ExecuteStatus { get; set; } /// /// 执行状态 /// [DisplayName("执行状态")] public string ExecuteStatusName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.EM_ExecuteStatus.ToString()) .Where(x => x.Value == ExecuteStatus) .Select(x => x.Name).FirstOrDefault(); } } /// /// 备注 /// [DisplayName("备注")] public string Remark { get; set; } /// /// 状态 /// [DisplayName("状态")] public int? RecordStatus { get; set; } /// /// 创建人 /// [DisplayName("创建人")] public Guid? CreateUserID { get; set; } /// /// 创建时间 /// [DisplayName("创建时间")] public DateTime? CreateTime { get; set; } /// /// 修改人 /// [DisplayName("修改人")] public Guid? ModifyUserID { get; set; } /// /// 修改时间 /// [DisplayName("修改时间")] public DateTime? ModifyTime { get; set; } } }