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.RetakeManage
{
public class RetakePlanTaskView
{
///
/// 重修计划ID
///
[DisplayName("重修计划ID")]
public Guid RetakePlanID { get; set; }
///
/// 重修计划名单ID
///
[DisplayName("重修计划名单ID")]
public Guid RetakePlanStudentID { get; set; }
///
/// 重修计划名单UserIDs
///
[DisplayName("重修计划名单UserIDs")]
public string UserIDs { get; set; }
///
/// 重修学年学期ID
///
[Required]
[DisplayName("重修学年学期ID")]
public Guid? SchoolyearID { get; set; }
///
/// 重修学年学期
///
[DisplayName("重修学年学期")]
public string SchoolyearCode { get; set; }
///
/// 重修类型
///
[Required]
[DisplayName("重修类型")]
public int? RetakeTypeID { get; set; }
///
/// 重修类型
///
[DisplayName("重修类型")]
public string RetakeTypeName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.ER_RetakeType.ToString())
.Where(x => x.Value == RetakeTypeID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 重修班级名称
///
[Required]
[DisplayName("重修班级名称")]
public string ClassName { get; set; }
///
/// 课程信息ID
///
[Required]
[DisplayName("课程信息ID")]
public Guid? CoursematerialID { get; set; }
///
/// 课程代码
///
[DisplayName("课程代码")]
public string CourseCode { get; set; }
///
/// 课程名称
///
[DisplayName("课程名称")]
public string CourseName { 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 = "CollegeID")]
public Guid? CourseCollegeID { get; set; }
///
/// 开课院系所代码
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
public string CourseCollegeNo { get; set; }
///
/// 开课院系所名称
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public string CourseCollegeName { get; set; }
///
/// 课程类型
///
[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();
}
}
///
/// 课程学分
///
[Required]
[DisplayName("课程学分")]
[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
public decimal Credit { get; set; }
///
/// 人数上限
///
[Required]
[DisplayName("人数上限")]
[RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入数字")]
public int? PeopleNumlimit { get; set; }
///
/// 人数下限
///
[Required]
[DisplayName("人数下限")]
[RegularExpression(@"^[0-9]*$", ErrorMessage = "请输入数字")]
public int? PeopleNumlower { get; set; }
///
/// 理论学时
///
[Required]
[DisplayName("理论学时")]
[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
public int? TheoryCourse { get; set; }
///
/// 实践学时
///
[Required]
[DisplayName("实践学时")]
[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
public int? Practicehours { get; set; }
///
/// 实验学时
///
[Required]
[DisplayName("实验学时")]
[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
public int? Trialhours { get; set; }
///
/// 总学时
///
[Required]
[DisplayName("总学时")]
[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
public int? Totalhours
{
get
{
return ((TheoryCourse ?? 0) + (Practicehours ?? 0));
}
}
///
/// 开始周次
///
[DisplayName("开始周次")]
[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
public int? StartWeeklyNum { get; set; }
///
/// 结束周次
///
[DisplayName("结束周次")]
[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
public int? EndWeeklyNum { get; set; }
///
/// 起止周次
///
[DisplayName("起止周次")]
public string StartEndWeeklyNum
{
get
{
if (StartWeeklyNum != null && EndWeeklyNum != null)
return StartWeeklyNum + "-" + EndWeeklyNum;
else
return "";
}
}
///
/// 星期
///
[DisplayName("星期")]
public int? Weekday { get; set; }
///
/// 星期
///
[DisplayName("星期")]
public string WeekdayName { get; set; }
///
/// 课程时间ID
///
[DisplayName("课程时间ID")]
public Guid? CoursesTimeID { get; set; }
///
/// 课程时间
///
[DisplayName("课程时间")]
public string CoursesTimeName { get; set; }
///
/// 教室ID
///
[DisplayName("教室ID")]
public Guid? ClassroomID { get; set; }
///
/// 教室
///
[DisplayName("教室")]
public string ClassroomName { get; set; }
///
/// 上课时间
///
[DisplayName("上课时间")]
public string WeekdayTimesSegmentName { get; set; }
///
/// 任课教师
///
[DisplayName("任课教师")]
public Guid? TeacherUserID { get; set; }
///
/// 教职工号
///
[DisplayName("教职工号")]
public string TeacherUserCode { get; set; }
///
/// 任课教师
///
[DisplayName("任课教师")]
public string TeacherName { get; set; }
///
/// 计划人数
///
[DisplayName("计划人数")]
public int? PlanNumber { get; set; }
///
/// 已报人数
///
[DisplayName("已报人数")]
public int? ApplyNumber { get; set; }
///
/// 学号
///
[DisplayName("学号")]
public Guid? UserID { get; set; }
///
/// 学号
///
[DisplayName("学号")]
public string LoginID { get; set; }
///
/// 姓名
///
[DisplayName("姓名")]
public string UserName { get; set; }
///
/// 性别
///
[DisplayName("性别")]
public int? SexID { get; set; }
///
/// 性别
///
[DisplayName("性别")]
public string SexName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Sex.ToString())
.Where(x => x.Value == SexID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 在校状态
///
[DisplayName("在校状态")]
public int? InSchoolStatusID { get; set; }
///
/// 在校状态
///
[DisplayName("在校状态")]
public string InSchoolStatusName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_InschoolStatus.ToString())
.Where(x => x.Value == InSchoolStatusID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 学籍状态
///
[DisplayName("学籍状态")]
public int? StudentStatusID { get; set; }
///
/// 学籍状态
///
[DisplayName("学籍状态")]
public string StudentStatusName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StudentStatus.ToString())
.Where(x => x.Value == StudentStatusID).Select(x => x.Name).FirstOrDefault();
}
}
///
/// 班级信息ID
///
[DisplayName("班级信息ID")]
public Guid? ClassmajorID { get; set; }
///
/// 班级编号
///
[DisplayName("班级编号")]
public string ClassmajorCode { get; set; }
///
/// 班级名称
///
[DisplayName("班级名称")]
public string ClassmajorName { get; set; }
///
/// 年级专业ID
///
[DisplayName("年级专业ID")]
public Guid? GrademajorID { get; set; }
///
/// 年级专业编号
///
[DisplayName("年级专业编号")]
public string GrademajorCode { get; set; }
///
/// 年级专业名称
///
[DisplayName("年级专业名称")]
public string GrademajorName { get; set; }
///
/// 院系所ID
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
public Guid? CollegeID { get; set; }
///
/// 院系所代码
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
public string CollegeNo { get; set; }
///
/// 院系所名称
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public string CollegeName { get; set; }
///
/// 年级
///
[DisplayName("年级")]
public int? Gradeyear { 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') : "");
}
}
///
/// 专业名称
///
[DisplayName("专业名称")]
public string StandardDesc
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
.Where(x => x.Value == StandardID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 培养层次
///
[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();
}
}
///
/// 培养层次
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
public string EducationStr { get; set; }
///
/// 学习形式
///
[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();
}
}
///
/// 学习形式
///
[DisplayName("学习形式")]
public string LearningformStr { get; set; }
///
/// 学制
///
[DisplayName("学制")]
public decimal? LearnSystem { get; set; }
///
/// 重修任务状态
///
public Nullable RecordStatus { get; set; }
///
/// 重修任务状态
///
[DisplayName("状态")]
public string RecordStatusCode
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.ER_RetakePlanStatus.ToString())
.Where(x => x.Value == RecordStatus)
.Select(x => x.Code).FirstOrDefault();
}
}
///
/// 重修任务状态
///
[DisplayName("状态")]
public string RecordStatusName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.ER_RetakePlanStatus.ToString())
.Where(x => x.Value == RecordStatus)
.Select(x => x.Name).FirstOrDefault();
}
}
}
}