using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using EMIS.ViewModel.CacheManage;
using System.ComponentModel.DataAnnotations;
namespace EMIS.ViewModel.MinorManage.MinorPlanManage
{
public class MinorPlanApplyView
{
///
/// 主键ID
///
public Guid? GradeMinorApplicationID { get; set; }
///
/// 辅修计划申请ID
///
public Guid? MinorPlanApplicationID { get; set; }
///
/// 辅修课程主键
///
public Guid? MinorCourseID { get; set; }
///
/// 年级
///
[Required]
[DisplayName("年级")]
public int? YearID { get; set; }
///
/// 源年级
///
[Required]
[DisplayName("源年级")]
public int? GrademajorBeForeYear { get; set; }
///
/// 目标年级
///
[Required]
[DisplayName("目标年级")]
public int? GrademajorAfterYear { get; set; }
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public Guid? BeForeCollegeID { get; set; }
///
/// 专业代码
///
[Required]
[DisplayName("专业代码")]
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
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
.Where(x => x.Value == StandardID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 院系所
///
[Required]
[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 CollegeNo { get; set; }
///
/// 院系所
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public string CollegeName { get; set; }
///
/// 教研室
///
[Required]
[DisplayName("教研室")]
public Guid? DepartmentID { get; set; }
///
/// 课程类型
///
[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();
}
}
///
/// 课程结构
///
[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 Guid? CoursematerialID { get; set; }
///
/// 课程资料代码
///
[DisplayName("课程资料代码")]
public string CourseCode { get; set; }
///
/// 课程名称
///
[DisplayName("课程名称")]
public string CourseName { get; set; }
///
/// 课程类别
///
[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? CourseQualityID { get; set; }
[DisplayName("课程性质名称")]
public string CourseQualityNameStr { 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("考试方式")]
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? 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();
}
}
///
/// 是否专业核心
///
[DisplayName("是否专业核心")]
public bool IsSpecialtycore { get; set; }
///
/// 是否专业核心
///
[DisplayName("是否专业核心")]
public string IsSpecialtycoreName { get; set; }
///
/// 是否合作开发课
///
[DisplayName("是否合作开发课")]
public bool IsCooperation { get; set; }
///
/// 是否合作开发课
///
[DisplayName("是否合作开发课")]
public string IsCooperationName { get; set; }
///
/// 是否必修课
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "IsRequired")]
public bool IsRequired { get; set; }
///
/// 是否必修课
///
[DisplayName("是否必修课")]
public string IsRequiredName { get; set; }
///
/// 是否网上选修课
///
[DisplayName("是否网上选修课")]
public bool IsElective { get; set; }
///
/// 是否网上选修课
///
[DisplayName("是否网上选修课")]
public string IsElectiveName { get; set; }
///
/// 是否网络课程
///
[DisplayName("是否网络课程")]
public bool IsNetworkCourse { get; set; }
///
/// 是否网络课程
///
[DisplayName("是否网络课程")]
public string IsNetworkCourseName { get; set; }
///
/// 是否学位主干课
///
[DisplayName("是否学位主干课")]
public bool IsMainCourse { get; set; }
///
/// 是否启用
///
[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();
}
}
///
/// 成绩类型
///
[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 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? 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? 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();
}
}
///
/// 开课学年
///
[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("学分")]
[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; }
///
/// 学年学期ID
///
public Guid? SchoolyearID { get; set; }
///
/// 学年学期ID
///
public string SchoolyearCode { get; set; }
///
/// 人数上限
///
[Required]
[DisplayName("人数上限")]
public int? StudentLimit { get; set; }
///
/// 处理方式
///
[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 ? "否" : "是"; }
}
///
/// 审批状态
///
[DisplayName("审批状态")]
public int? ApprovalStatus { get; set; }
///
/// 审批状态
///
[DisplayName("审批状态")]
public string ApprovalStatusName { get; set; }
///
/// 备注
///
[DisplayName("备注")]
public string Remarks { get; set; }
///
/// 创建人
///
[DisplayName("创建人")]
public Guid? CreateUserID { get; set; }
///
/// 创建人姓名
///
[DisplayName("创建人姓名")]
public string CreateUserName { get; set; }
///
/// 创建时间
///
[DisplayName("创建时间")]
public DateTime? CreateTime { get; set; }
}
}