using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using EMIS.ViewModel.CacheManage;
namespace EMIS.ViewModel.CultureplanManage
{
public class SpecialtyCourseView
{
///
/// 主键ID
///
[DisplayName("主键ID")]
public Guid SpecialtyCourseID { 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') : "");
}
}
///
/// 专业代码(Excel导入)
///
[DisplayName("专业代码")]
public string StandardCodeStr { get; set; }
///
/// 专业名称
///
[DisplayName("专业名称")]
public string StandardName { get; set; }
///
/// 专业名称(Excel导入)
///
[DisplayName("专业名称")]
public string StandardNameStr { get; set; }
///
/// 培养层次
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
public int? EducationID { get; set; }
///
/// 培养层次(Excel导入)
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
public string EducationStr { 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; }
///
/// 学习形式(Excel导入)
///
[DisplayName("学习形式")]
public string LearningformStr { 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; }
///
/// 学制(Excel导入)
///
[DisplayName("学制")]
public string LearnSystemStr { get; set; }
///
/// 开课学年
///
[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();
}
}
///
/// 学期
///
[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; }
///
/// 开课学期(Excel导入)
///
[DisplayName("开课学期")]
public string StarttermStr { 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("课程信息ID")]
public Guid? CoursematerialID { get; set; }
///
/// 课程代码
///
[DisplayName("课程代码")]
public string CourseCode { get; set; }
///
/// 课程名称
///
[DisplayName("课程名称")]
public string CourseName { get; set; }
///
/// 课程结构
///
[DisplayName("课程结构")]
public int? CourseStructureID { get; set; }
///
/// 课程结构(Excel导入)
///
[DisplayName("课程结构")]
public string CourseStructureStr { 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; }
///
/// 课程属性(Excel导入)
///
[DisplayName("课程属性")]
public string CourseCategoryStr { 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; }
///
/// 课程类型(Excel导入)
///
[DisplayName("课程类型")]
public string CourseTypeStr { 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; }
///
/// 课程性质(Excel导入)
///
[DisplayName("课程性质")]
public string CourseQualityStr { 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; }
///
/// 课程学分(Excel导入)
///
[DisplayName("课程学分")]
public string CreditStr { get; set; }
///
/// 理论学时
///
[Required]
[DisplayName("理论学时")]
[RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
public int? TheoryCourse { get; set; }
///
/// 理论学时(Excel导入)
///
[DisplayName("理论学时")]
public string TheoryCourseStr { get; set; }
///
/// 实践学时
///
[Required]
[DisplayName("实践学时")]
[RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
public int? Practicehours { get; set; }
///
/// 实践学时(Excel导入)
///
[DisplayName("实践学时")]
public string PracticehoursStr { get; set; }
///
/// 实验学时
///
[Required]
[DisplayName("实验学时")]
//[Compare("Practicehours")]
[RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
public int? Trialhours { get; set; }
///
/// 实验学时(Excel导入)
///
[DisplayName("实验学时")]
public string TrialhoursStr { 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("开课教研室ID")]
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? CollegeID { get; set; }
///
/// 开课院系代码
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CourseCollege")]
public string CollegeCode { get; set; }
///
/// 开课院系
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CourseCollege")]
public string CollegeName { get; set; }
///
/// 院系专业ID(SOC)
///
[DisplayName("院系专业ID")]
public Guid? FacultymajorID { get; set; }
///
/// 是否专业核心
///
[DisplayName("是否专业核心")]
public bool IsSpecialtycore { get; set; }
///
/// 是否专业核心(Excel导入用)
///
[DisplayName("是否专业核心")]
public string IsSpecialtycoreStr { get; set; }
///
/// 是否专业核心
///
[DisplayName("是否专业核心")]
public string IsSpecialtycoreName
{
get { return this.IsSpecialtycore != true ? "否" : "是"; }
}
///
/// 是否合作开发
///
[DisplayName("是否合作开发")]
public bool IsCooperation { get; set; }
///
/// 是否合作开发(Excel导入用)
///
[DisplayName("是否合作开发")]
public string IsCooperationStr { 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; }
///
/// 是否必修课(Excel导入用)
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "IsRequired")]
public string IsRequiredStr { get; set; }
///
/// 是否必修课
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "IsRequired")]
public string IsRequiredName
{
get { return this.IsRequired != true ? "否" : "是"; }
}
///
/// 是否网上选修
///
[DisplayName("是否网上选修")]
public bool IsElective { get; set; }
///
/// 是否网上选修(Excel导入用)
///
[DisplayName("是否网上选修")]
public string IsElectiveStr { get; set; }
///
/// 是否网上选修
///
[DisplayName("是否网上选修")]
public string IsElectiveName
{
get { return this.IsElective != true ? "否" : "是"; }
}
///
/// 是否网络课程
///
[DisplayName("是否网络课程")]
public bool IsNetworkCourse { get; set; }
///
/// 是否网络课程(Excel导入用)
///
[DisplayName("是否网络课程")]
public string IsNetworkCourseStr { get; set; }
///
/// 是否网络课程
///
[DisplayName("是否网络课程")]
public string IsNetworkCourseName
{
get { return this.IsNetworkCourse != true ? "否" : "是"; }
}
///
/// 是否学位课程
///
[DisplayName("是否学位课程")]
public bool IsMainCourse { get; set; }
///
/// 是否学位课程(Excel导入用)
///
[DisplayName("是否学位课程")]
public string IsMainCourseStr { get; set; }
///
/// 是否学位课程
///
[DisplayName("是否学位课程")]
public string IsMainCourseName
{
get { return this.IsMainCourse != true ? "否" : "是"; }
}
///
/// 是否需要教材
///
[DisplayName("是否需要教材")]
public bool IsNeedMaterial { get; set; }
///
/// 是否需要教材(Excel导入用)
///
[DisplayName("是否需要教材")]
public string IsNeedMaterialStr { get; set; }
///
/// 是否需要教材
///
[DisplayName("是否需要教材")]
public string IsNeedMaterialName
{
get { return this.IsNeedMaterial != true ? "否" : "是"; }
}
///
/// 精品课程
///
[DisplayName("精品课程")]
public int? CourseFineID { get; set; }
///
/// 精品课程(Excel导入用)
///
[DisplayName("精品课程")]
public string CourseFineStr { 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; }
///
/// 实践类型(Excel导入用)
///
[DisplayName("实践类型")]
public string PracticeTypeStr { 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; }
///
/// 授课语言(Excel导入用)
///
[DisplayName("授课语言")]
public string TeachinglanguageStr { 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; }
///
/// 考试方式(Excel导入用)
///
[DisplayName("考试方式")]
public string ExaminationModeStr { 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; }
///
/// 成绩类型(Excel导入用)
///
[DisplayName("成绩类型")]
public string ResultTypeStr { 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; }
///
/// 处理方式(Excel导入用)
///
[DisplayName("处理方式")]
public string HandleModeStr { 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; }
///
/// 授课方式List(Excel导入用,可存在多个授课方式--用顿号隔开)
///
[DisplayName("授课方式")]
public string TeachingModeIDListStr { 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; }
///
/// 授课地点List(Excel导入用,可存在多个授课地点--用顿号隔开)
///
[DisplayName("授课地点")]
public string TeachingPlaceIDListStr { 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 bool IsEnable { get; set; }
///
/// 是否启用
///
[DisplayName("是否启用")]
public string IsEnableName
{
get { return this.IsEnable != true ? "否" : "是"; }
}
///
/// 备注
///
[DisplayName("备注")]
public string Remark { get; set; }
///
/// 错误信息(Excel导入)
///
[DisplayName("未导入原因")]
public string ErrorMessage { 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; }
}
}