using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EMIS.ViewModel.SystemView;
using EMIS.ViewModel.UniversityManage.TeacherManage;
using EMIS.Entities;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using EMIS.ViewModel.CacheManage;
namespace EMIS.ViewModel.CultureplanManage.PlanManagement
{
public class OptionalCoursePlanView
{
///
/// OptionalCourseID
///
public System.Guid OptionalCourseID { get; set; }
///
/// 年级专业
///
[Required]
[DisplayName("年级专业")]
public Nullable GrademajorID { get; set; }
///
/// 年级专业代码
///
[DisplayName("年级专业")]
public string GrademajorCode { get; set; }
///
/// 年级名称
///
[DisplayName("年级名称")]
public string GrademajorName { get; set; }
public Nullable CampusID { get; set; }
public Nullable CollegeID { get; set; }
///
/// 院系所
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public string CollegeName { get; set; }
public Guid ClassmajorID { get; set; }
///
/// 教研室
///
[DisplayName("教研室")]
[Required]
public Guid? DepartmentID { get; set; }
///
/// 教研室
///
[DisplayName("教研室")]
public string DepartmentName { get; set; }
///
/// 专业课程
///
[DisplayName("专业课程")]
public Nullable SpecialtyCourseID { get; set; }
///
/// 专业信息ID
///
[Required]
[DisplayName("专业信息")]
public Nullable SpecialtyID { get; set; }
///
/// 标准专业
///
public int? StandardID { get; set; }
///
/// 专业代码
///
[DisplayName("专业代码")]
public string StandardCode
{
get;
set;
//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;
//get
//{
// return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
// .Where(x => x.Value == StandardID)
// .Select(x => x.Name).FirstOrDefault();
//}
}
///
/// 学制
///
public decimal? LearnSystem { get; set; }
///
/// 培养层次
///
public int? EducationID { get; set; }
///
/// 培养层次
///
[DisplayName("培养层次")]
public string EducationName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
.Where(x => x.Value == EducationID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 学习形式
///
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? 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();
}
}
///
/// 开始周次
///
[DisplayName("开始周次")]
public int? StartWeeklyNum { get; set; }
///
/// 结束周次
///
[DisplayName("结束周次")]
public int? EndWeeklyNum { get; set; }
public string StartEndWeeklyNum
{
get
{
return (this.StartWeeklyNum.HasValue && this.EndWeeklyNum.HasValue) ?
(this.StartWeeklyNum.Value.ToString() + "-" + this.EndWeeklyNum.Value.ToString()) : "";
}
}
///
/// 考试方式
///
[DisplayName("考试方式")]
public int? ExaminationModeID { get; set; }
public string ExaminationModeNameStr { get; set; }
///
/// 考试方式名称
///
[DisplayName("考试方式名称")]
public string ExaminationModeDesc
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString())
.Where(x => x.Value == ExaminationModeID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 处理方式
///
[DisplayName("处理方式")]
public int? HandleModeID { get; set; }
public string HandleModeDesc
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HandleMode.ToString())
.Where(x => x.Value == HandleModeID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 成绩类型
///
[Required]
[DisplayName("成绩类型")]
public int? ResultTypeID { get; set; }
public virtual IEnumerable Sys_User { get; set; }
///
/// 选课编号
///
[DisplayName("选课编号")]
public string No { get; set; }
///
/// 选修任务班名称
///
[DisplayName("选修任务班名称")]
public string DefaultClassName { get; set; }
///
/// 学年学期
///
[Required]
[DisplayName("学年学期")]
public Nullable SchoolyearID { get; set; }
public string SchoolyearDesc { get; set; }
///
/// 是否需要教材
///
[DisplayName("是否需要教材")]
public bool IsNeedMaterial { get; set; }
public string IsNeedMaterialDesc
{
get { return this.IsNeedMaterial == true ? "是" : "否"; }
}
///
/// 人数下限
///
//[Required]
[DisplayName("人数下限")]
public Nullable PeopleNumlower { get; set; }
///
/// 人数上限
///
//[Required]
[DisplayName("人数上限")]
public Nullable PeopleNumlimit { get; set; }
///
/// 是否启用
///
[Required]
[DisplayName("是否启用")]
public bool IsEnable { get; set; }
public string IsEnableDesc
{
get { return this.IsEnable == true ? "是" : "否"; }
}
[Required]
[DisplayName("是否开放")]
public bool IsOpened { get; set; }
public string IsOpenedDesc
{
get { return this.IsOpened == true ? "是" : "否"; }
}
///
/// 学年(学年学期对应学年)
///
[DisplayName("学年")]
public int? Schoolyear { get; set; }
[DisplayName("年级")]
public int? Years { get; set; }
///
/// 备注
///
[DisplayName("备注")]
public string Remarks { 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; }
///
/// 课程结构
///
[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? 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? 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();
}
}
///
/// 理论学时
///
[DisplayName("理论学时")]
public int? TheoryCourse { get; set; }
///
/// 实践学时
///
[DisplayName("实践学时")]
public int? Practicehours { get; set; }
///
/// 实验学时
///
[DisplayName("实验学时")]
public int? Trialhours { get; set; }
///
/// 每周次数
///
[DisplayName("每周次数")]
public int? WeeklyNum { get; set; }
///
/// 周学时
///
[DisplayName("周学时")]
public int? WeeklyHours { get; set; }
///
/// 理论周数
///
[DisplayName("理论周数")]
public int? TheoryWeeklyNum { get; set; }
///
/// 实践周数
///
[DisplayName("实践周数")]
public int? PracticeWeeklyNum { get; set; }
///
/// 实验周数
///
[DisplayName("实验周数")]
public int? TrialWeeklyNum { get; set; }
///
/// 学分
///
[DisplayName("学分")]
[DisplayFormat(DataFormatString = "{0:N1}")]
[RegularExpression(@"^\d+(\.\d{1,1})?$", ErrorMessage = "请输整数或保留1位小数")]
public decimal Credit { get; set; }
///
/// 总学时
///
[DisplayName("总学时")]
public int? Totalhours
{
get { return this.TheoryCourse ?? 0 + this.Practicehours ?? 0 + this.Trialhours ?? 0; }
}
///
/// 上课周次
///
[DisplayName("上课周次")]
public int? SchoolweeksNum
{
get { return this.TheoryWeeklyNum ?? 0 + this.PracticeWeeklyNum ?? 0 + this.TrialWeeklyNum ?? 0; }
}
///
/// 授课方式
///
[DisplayName("授课方式")]
public List TeachingModeID { get; set; }
///
/// 授课语言
///
[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();
}
}
///
/// 是否学位或主干课
///
[DisplayName("是否学位或主干课")]
public bool IsMainCourse { get; set; }
///
/// 是否学位或主干课
///
[DisplayName("是否学位或主干课")]
public string IsMainCourseName
{ get { return this.IsMainCourse == true ? "是" : "否"; } }
[DisplayName("学年学期")]
public string SchoolYearCode { get; set; }
///
/// 开课学年
///
[DisplayName("开课学年")]
[Required]
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("学期")]
[Required]
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();
}
}
///
/// 开课学期
///
[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? SchoolValue { get; set; }
///
/// 课程性质
///
[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();
}
}
public string ReturnMessage { get; set; }
///
/// 错误信息
///
[DisplayName("错误信息")]
public string ErrorMessage { get; set; }
private bool _isExcelVaildateOK = true;
///
/// Excel验证是否通过,默认为true
/// true:通过;false:不通过
///
public bool IsExcelVaildateOK
{
get { return _isExcelVaildateOK; }
set { _isExcelVaildateOK = value; }
}
}
}