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.EducationManage
{
public class ExecutableMinorPlanView
{
///
/// 辅修执行计划ID
///
[DisplayName("辅修执行计划ID")]
public Guid? ExecutableMinorPlanID { get; set; }
[DisplayName("辅修计划ID")]
public Guid? MinorPlanID { get; set; }
///
/// 学年学期ID
///
[DisplayName("学年学期")]
public Guid? SchoolyearID { get; set; }
///
/// 开课学年
///
[Required]
[DisplayName("开课学年")]
public int? SchoolyearNumID { get; set; }
[DisplayName("开课学年")]
public string SchoolyearNumNameStr { 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 SchoolcodeStr { 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();
}
}
///
/// 校区
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Campus")]
public Guid? CampusID { get; set; }
///
/// 院系所ID
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
public Guid? CollegeID { get; set; }
public string CollegeCode { get; set; }
///
/// 院系所
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public string CollegeName { get; set; }
///
/// 年级
///
[Required]
[DisplayName("年级")]
public int? YearID { get; set; }
///
/// 专业代码对应的字典Value
///
[Required]
[DisplayName("专业代码")]
public int? StandardID { get; set; }
///
/// 专业代码(国标码)
///
[Required]
[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') : "");
}
}
///
/// 专业名称
///
[Required]
[DisplayName("专业名称")]
public string StandardName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
.Where(x => x.Value == StandardID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 学制
///
[DisplayName("学制")]
public decimal? LearnSystem { get; set; }
///
/// 培养层次
///
[DisplayName("培养层次")]
public int? EducationID { get; set; }
///
/// 学习形式
///
[DisplayName("学习形式")]
public int? LearningformID { get; set; }
///
/// 任务班名称
///
[DisplayName("任务班名称")]
public string DefaultClassName { get; set; }
///
/// 课程ID
///
[Required]
[DisplayName("课程名称")]
public Guid? CoursematerialID { get; set; }
///
/// 课程代码
///
public string CourseCode { get; set; }
///
/// 课程名称
///
[DisplayName("课程名称")]
public string CourseName { get; set; }
[DisplayName("是否需要教材")]
public bool IsNeedMaterial { get; set; }
///
/// 教研室名称
///
[Required]
[DisplayName("教研室")]
public Guid? DepartmentID { get; set; }
///
/// 教研室名称
///
[DisplayName("教研室")]
public string DepartmentName { 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();
}
}
///
/// 成绩类型
///
[Required]
[DisplayName("成绩类型")]
public int? ResultTypeID { get; set; }
///
/// 课程类别
///
[Required]
[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; set; }
///
/// 课程性质
///
[Required]
[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();
}
}
///
/// 实践类型
///
[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();
}
}
///
/// 考试方式
///
[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();
}
}
///
/// 授课语言
///
[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();
}
}
///
/// 精品课程 2016年10月13日15:11:27 应兵良要求去掉必填验证、
///
//[Required]
[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 bool IsSpecialtycore { get; set; }
///
/// 是否专业核心
///
[DisplayName("是否专业核心")]
public string IsSpecialtycoreName
{
get { return this.IsSpecialtycore != true ? "否" : "是"; }
}
///
/// 是否合作开发课
///
[DisplayName("是否合作开发课")]
public bool IsCooperation { get; set; }
///
/// 是否合作开发课
///
[DisplayName("是否合作开发课")]
public string IsCooperationName
{
get { return this.IsCooperation != true ? "否" : "是"; }
}
///
/// 是否必修课
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "IsRequired")]
public bool IsRequired { get; set; }
///
/// 是否必修课
///
[DisplayName("是否必修课")]
public string IsRequiredName
{
get { return this.IsRequired != true ? "否" : "是"; }
}
///
/// 是否网上选修课
///
[DisplayName("是否网上选修课")]
public bool IsElective { get; set; }
///
/// 是否网上选修课
///
[DisplayName("是否网上选修课")]
public string IsElectiveName
{
get { return this.IsElective != true ? "否" : "是"; }
}
///
/// 是否网络课程
///
[DisplayName("是否网络课程")]
public bool IsNetworkCourse { get; set; }
///
/// 是否网络课程名称
///
[DisplayName("是否网络课程名称")]
public string IsNetworkCourseName
{
get { return this.IsNetworkCourse != true ? "否" : "是"; }
}
///
/// 是否学位或主干课
///
[DisplayName("是否学位或主干课")]
public bool IsMainCourse { get; set; }
///
/// 是否学位或主干课名称
///
[DisplayName("是否学位或主干课")]
public string IsMainCourseName
{
get { return this.IsMainCourse != true ? "否" : "是"; }
}
///
/// 学分
///
[Required]
[DisplayName("学分")]
[DisplayFormat(DataFormatString = "{0:#.0}")]
[RegularExpression(@"^\d+(\.\d{1,1})?$", ErrorMessage = "请输整数或保留1位小数")]
public decimal? Credit { get; set; }
///
/// 总学时
///
[DisplayName("总学时")]
public decimal? Totalhours { get; set; }
///
/// 理论学时
///
[Required]
[DisplayName("理论学时")]
[RegularExpression(@"^[1-9]\d*|0$", ErrorMessage = "请输入数字")]
public int? TheoryCourse { get; set; }
///
/// 实践学时
///
[Required]
[DisplayName("实践学时")]
[RegularExpression(@"^[1-9]\d*|0$", ErrorMessage = "请输入数字")]
public int? Practicehours { get; set; }
///
/// 实验学时
///
[Required]
[DisplayName("实验学时")]
[RegularExpression(@"^[1-9]\d*|0$", ErrorMessage = "请输入数字")]
public int? Trialhours { get; set; }
///
/// 上课周数
///
[DisplayName("上课周数")]
[RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
public int? SchoolweeksNum { get; set; }
///
/// 每周次数
///
[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; }
///
/// 开始周次
///
[Required]
[DisplayName("开始周次")]
[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; }
///
/// 起始周次
///
[DisplayName("起始周次")]
public string Startingtheweek
{
get
{
return (StartWeeklyNum ?? 0).ToString() + "-" + (EndWeeklyNum ?? 0).ToString();
}
}
///
/// 处理方式
///
[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 int? PeopleNumber { get; set; }
[Required]
[DisplayName("授课方式")]
public List TeachingModeID { get; set; }
[DisplayName("授课地点")]
public List TeachingPlaceID { get; set; }
public Guid EducationMissionClassID { get; set; }
[DisplayName("备注")]
public string Remark { get; set; }
[DisplayName("状态")]
public int? RecordStatus { get; set; }
public string RecordStatusName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.EM_ExecuteStatus.ToString())
.Where(x => x.Value == RecordStatus)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 创建人
///
public Guid? CreateUserID { get; set; }
///
/// 创建时间
///
public DateTime? CreateTime { get; set; }
}
}