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.MinorManage.MinorPlanManage
{
public class MinorSpecialtyPlanView
{
///
/// 主键ID
///
public Guid? MinorPlanID { get; set; }
///
/// 辅修计划申请ID
///
public Guid? MinorPlanApplicationID { get; set; }
///
/// 主键ID
///
public Guid? MinorCourseID { get; set; }
///
/// 学年学期ID
///
[DisplayName("学年学期")]
public Guid? SchoolyearID { get; set; }
public string SchoolyearCode { get; set; }
///
/// 院系所ID
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public Guid? CollegeID { get; set; }
///
/// 院系所
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public string CollegeName { get; set; }
///
/// 教研室
///
[Required]
[DisplayName("教研室")]
public Guid? DepartmentID { get; set; }
///
/// 教研室代码
///
[DisplayName("教研室代码")]
public string DepartmentCode { get; set; }
///
/// 教研室
///
[DisplayName("教研室")]
public string DepartmentName { get; set; }
///
/// 标准专业
///
[DisplayName("专业名称")]
public int? StandardID { get; set; }
///
/// 年级
///
[DisplayName("年级")]
public int? YearID { get; set; }
///
/// 专业代码(国标码)
///
[DisplayName("专业代码")]
public string Code { get; set; }
///
/// 专业代码(国标码)
///
[DisplayName("专业代码")]
public string SpecialtyCode
{
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 SpecialtyCodeStr { get; set; }
///
/// 专业名称
///
[DisplayName("专业名称")]
public string StandardName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
.Where(x => x.Value == StandardID)
.Select(x => x.Name).FirstOrDefault();
}
}
[DisplayName("专业名称")]
public string StandardNameStr { get; set; }
[DisplayName("学制")]
public string LearnSystemStr { get; set; }
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
public string EducationNameStr { get; set; }
[DisplayName("学习形式")]
public string LearningformNameStr { get; set; }
///
/// 学制
///
[DisplayName("学制")]
public decimal? LearnSystem { 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();
}
}
///
/// 课程资料
///
[Required]
[DisplayName("课程资料")]
public Guid? CoursematerialID { get; set; }
///
/// 课程资料代码
///
[DisplayName("课程资料代码")]
public string CourseCode { get; set; }
///
/// 课程名称
///
[DisplayName("课程名称")]
public string CourseName { get; set; }
///
/// 课程结构
///
[DisplayName("课程结构")]
public int? CourseStructureID { get; set; }
[DisplayName("课程结构")]
public string CourseStructureNameStr { 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? 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 bool IsNeedMaterial { get; set; }
///
/// 是否需要教材
///
[DisplayName("是否需要教材")]
public string IsNeedMaterialName
{
get { return this.IsNeedMaterial != true ? "否" : "是"; }
}
///
/// 课程类别
///
[Required]
[DisplayName("课程属性")]
public int? CourseCategoryID { get; set; }
[DisplayName("课程属性")]
public string CourseCategoryNameStr { 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 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();
}
}
///
/// 课程性质
///
[Required]
[DisplayName("课程性质")]
public int? CourseQualityID { get; set; }
[DisplayName("课程性质名称")]
public string CourseQualityNameStr { get; set; }
///
///学生课程类型
///
[DisplayName("课程类型")]
public string StuCourseTypeName
{
get
{
var type = CourseQualityName;
if (type == "必修课")
{
return "是";
}
else
{
return "否";
}
}
}
///
/// 课程性质
///
[DisplayName("课程性质名称")]
public string CourseQualityName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseQuality.ToString())
.Where(x => x.Value == CourseQualityID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 授课方式
///
[DisplayName("授课方式")]
public List TeachingModeID { get; set; }
[DisplayName("授课方式")]
public string TeachingModeStr { get; set; }
///
/// 授课地点
///
[DisplayName("授课地点")]
public List TeachingPlaceID { get; set; }
[DisplayName("授课地点")]
public string TeachingPlaceStr { 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 int? ExaminationModeID { get; set; }
[DisplayName("考试方式名称")]
public string ExaminationModeNameStr { 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 TeachinglanguageNameStr { 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? 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();
}
}
///
/// 精品课程
///
[DisplayName("精品课程")]
public int? CourseFineID { get; set; }
[DisplayName("精品课程")]
public string CourseFineNameStr { get; set; }
///
/// 精品课程
///
[DisplayName("精品课程")]
public string CourseFineName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseFine.ToString())
.Where(x => x.Value == CourseFineID)
.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();
}
}
///
/// 成绩类型
///
[DisplayName("成绩类型")]
public string ResultTypeNameStr { get; set; }
///
/// 是否专业核心
///
[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 ? "否" : "是"; }
}
///
/// 是否启用
///
public bool IsCourseEnable { get; set; }
///
/// 是否启用名称
///
[DisplayName("是否启用")]
public string IsCourseEnableName
{
get { return this.IsCourseEnable != true ? "否" : "是"; }
}
///
/// 是否启用
///
[DisplayName("是否启用")]
public bool IsEnable { get; set; }
///
/// 是否启用
///
[DisplayName("是否启用")]
public string IsEnableName
{
get
{
int value = 0;
if (IsEnable == true)
{
value = 1;
}
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_GeneralPurpose.ToString())
.Where(x => x.Value == value)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 是否启用
///
[DisplayName("是否启用")]
public string IsEnableStr { get; set; }
///
/// 学分
///
[Required]
[DisplayName("学分")]
[DisplayFormat(DataFormatString = "{0:#.0}")]
[RegularExpression(@"^\d+(\.\d{1,1})?$", ErrorMessage = "请输整数或保留1位小数")]
public decimal? Credit { get; set; }
[DisplayName("学分")]
public string CreditStr { get; set; }
///
/// 总学时
///
[DisplayName("总学时")]
[RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
public int? Totalhours { get; set; }
///
/// 理论学时
///
[Required]
[DisplayName("理论学时")]
[RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
public int? TheoryCourse { get; set; }
[DisplayName("理论学时")]
public string TheoryCourseStr { get; set; }
///
/// 实践学时
///
[Required]
[DisplayName("实践学时")]
[RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
public int? Practicehours { get; set; }
[DisplayName("实践学时")]
public string PracticehoursStr { get; set; }
///
/// 实验学时
///
[Required]
[DisplayName("实验学时")]
[RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
public int? Trialhours { get; set; }
[DisplayName("实验学时")]
public string TrialhoursStr { get; set; }
///
/// 总周次
///
[DisplayName("总周次")]
[RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
public int? SchoolweeksNum { get; set; }
///
/// 每周次数
///
[DisplayName("每周次数")]
public int? WeeklyNum { get; set; }
///
/// 理论周次
///
[DisplayName("理论周次")]
public int? TheoryWeeklyNum { get; set; }
///
/// 实践周次
///
[DisplayName("实践周次")]
public int? PracticeWeeklyNum { get; set; }
///
/// 实验周次
///
[DisplayName("实验周次")]
public int? TrialWeeklyNum { get; set; }
///
/// 开始周次
///
[DisplayName("开始周次")]
[Required]
[RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
public int? StartWeeklyNum { get; set; }
///
/// 结束周次
///
[DisplayName("结束周次")]
[Required]
[RegularExpression(@"^[0-9]*$", ErrorMessage = "请输整数")]
public int? EndWeeklyNum { get; set; }
///
/// 周学时
///
[DisplayName("周学时")]
public int? WeeklyHours { get; set; }
///
/// 创建人
///
[DisplayName("创建人")]
public Guid? CreateUserID { get; set; }
///
/// 创建时间
///
[DisplayName("创建时间")]
public DateTime? CreateTime { get; set; }
///
/// 备注
///
[DisplayName("备注")]
public string Remarks { get; set; }
///
/// 备注
///
[DisplayName("错误信息")]
public string ErrorMessage { get; set; }
public bool IsGenerateExecutablePlan { get; set; }
private bool _isExcelVaildateOK = true;
///
/// Excel验证是否通过,默认为true
/// true:通过;false:不通过
///
public bool IsExcelVaildateOK
{
get { return _isExcelVaildateOK; }
set { _isExcelVaildateOK = value; }
}
}
}