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.RetakeManage
{
public class RetakePlanTaskSettingView : RetakePlanTaskView
{
///
/// 是否验证冲突
///
[DisplayName("是否验证冲突")]
public bool? IsNeedVerify { 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();
}
}
///
/// 课程属性
///
[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? 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();
}
}
///
/// 理论周次
///
[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("上课周数")]
public int? SchoolweeksNum
{
get
{
return (TheoryWeeklyNum ?? 0) + (PracticeWeeklyNum ?? 0) + (TrialWeeklyNum ?? 0);
}
}
///
/// 周学时
///
[Required]
[DisplayName("周学时")]
[RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入数字")]//^[1-9]\d*|0$
public int? WeeklyHours { get; set; }
///
/// 每周次数
///
[Required]
[DisplayName("每周次数")]
[RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入数字")]
public int? WeeklyNum { get; set; }
///
/// 实践类型
///
[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 == CourseTypeID)
.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();
}
}
///
/// 精品课程
///
[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; 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 string IsMainCourseName { get; set; }
///
/// 处理方式
///
[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; set; }
///
/// 排课明细
///
[DisplayName("排课明细")]
public string Scheduling { get; set; }
///
/// 任课教师
///
[DisplayName("任课教师")]
public HashSet Teachers { get; set; }
///
/// 任课教师
///
[DisplayName("任课教师")]
public string TeacherNames
{
get
{
var teacherNames = string.Join(",", Teachers.Select(x => x.Name).ToList());
if (string.IsNullOrEmpty(teacherNames))
{
return "";
}
else
{
return teacherNames;
}
}
}
///
/// 重修计划授课方式ID
///
[DisplayName("重修计划授课方式ID")]
public Guid? RetakePlanTeachingModeTypeID { get; set; }
///
/// 授课方式
///
[DisplayName("授课方式")]
public List TeachingModeID { get; set; }
///
/// 授课方式
///
[DisplayName("授课方式")]
public string TeachingModeName { get; set; }
///
/// 重修计划授课地点ID
///
[DisplayName("重修计划授课地点ID")]
public Guid? RetakePlanTeachingPlaceID { get; set; }
///
/// 授课地点
///
[DisplayName("授课地点")]
public List TeachingPlaceID { get; set; }
///
/// 授课地点名称
///
[DisplayName("授课地点名称")]
public string TeachingPlaceName { get; set; }
///
/// 备注
///
[DisplayName("备注")]
public string Remarks { get; set; }
///
/// 创建人
///
[DisplayName("创建人")]
public Guid? CreateUserID { get; set; }
///
/// 创建时间
///
[DisplayName("创建时间")]
public DateTime? CreateTime { get; set; }
}
}