123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386 |
- 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.SelectCourse.SelectCourseResult
- {
- public class StudentSelectCourseView
- {
- public Guid ID { get; set; }
- public Guid? SchoolyearID { get; set; }
- public string SchoolYearCode { get; set; }
- [DisplayName("选修任务班名称")]
- public string DefaultClassName { get; set; }
- [DisplayName("教师")]
- public Guid? TeacherUserID { get; set; }
- [DisplayName("教师工号")]
- public string TeacherUserCode { get; set; }
- [DisplayName("教师名称")]
- public string TeacherName { get; set; }
- [DisplayName("校区")]
- public Guid? CampusID { get; set; }
- /// <summary>
- /// 校区
- /// </summary>
- [DisplayName("校区")]
- public string CampusName { get; set; }
-
- ///
- ///
- /// <summary>
- /// 教研室
- /// </summary>
- [DisplayName("教研室")]
- public Guid? DepartmentID { get; set; }
- /// <summary>
- /// 教研室
- /// </summary>
- [DisplayName("教研室")]
- public string DepartmentName { get; set; }
- /// <summary>
- /// 每周次数
- /// </summary>
- [DisplayName("每周次数")]
- public int? WeeklyNum { get; set; }
- /// <summary>
- /// 开始周次
- /// </summary>
- [DisplayName("开始周次")]
- public int? StartWeeklyNum { get; set; }
- /// <summary>
- /// 结束周次
- /// </summary>
- [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()) : "";
- }
- }
- /// <summary>
- /// 开始时间
- /// </summary>
- public DateTime? StartTime { get; set; }
- public string StartTimeStr
- {
- get
- {
- return StartTime.HasValue ? StartTime.Value.ToShortDateString() : null;
- }
- }
- /// <summary>
- /// 结束时间
- /// </summary>
- public DateTime? EndTime { get; set; }
- public string EndTimeStr
- {
- get
- {
- return EndTime.HasValue ? EndTime.Value.ToShortDateString() : null;
- }
- }
- /// <summary>
- /// 是否需要教材
- /// </summary>
- [DisplayName("是否需要教材")]
- public bool IsNeedMaterial { get; set; }
- /// <summary>
- /// 是否需要教材
- /// </summary>
- [DisplayName("是否需要教材")]
- public string IsNeedMaterialName
- {
- get { return this.IsNeedMaterial != true ? "否" : "是"; }
- }
- /// <summary>
- /// 选择课程ID
- /// </summary>
- [DisplayName("选择课程ID")]
- public Guid SelectCourseID { get; set; }
- [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; }
- //[DisplayName("选修类型")]
- //public int SelectCourseType { get; set; }
- //[DisplayName("选修类型")]
- //public string SelectCourseTypeName { get { return SelectCourseType == 0 ? "专业选修" : "任选选修"; } }
- public Guid? CoursematerialID { get; set; }
- /// <summary>
- /// 课程代码
- /// </summary>
- [DisplayName("课程代码")]
- public string CourseCode { get; set; }
- /// <summary>
- /// 课程名称
- /// </summary>
- [DisplayName("课程名称")]
- public string CourseName { get; set; }
- [DisplayName("课程性质")]
- public int? CourseQualityID { get; set; }
- /// <summary>
- /// 课程性质
- /// </summary>
- [DisplayName("课程性质")]
- public string CourseQualityName
- {
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseQuality.ToString())
- .Where(x => x.Value == CourseQualityID)
- .Select(x => x.Name).FirstOrDefault();
- }
- }
- [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();
- }
- }
- /// <summary>
- /// 授课方式
- /// </summary>
- [DisplayName("授课方式")]
- public int? TeachingModeID { get; set; }
- /// <summary>
- /// 授课方式
- /// </summary>
- [DisplayName("授课方式")]
- public string TeachingModeName
- {
- //get;
- //set;
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString())
- .Where(x => x.Value == TeachingModeID)
- .Select(x => x.Name).FirstOrDefault();
- }
- }
- /// <summary>
- /// 学分
- /// </summary>
- [DisplayName("学分")]
- public decimal? Credit { get; set; }
- /// <summary>
- /// 理论学时
- /// </summary>
- [DisplayName("理论学时")]
- public int? TheoryCourse { get; set; }
- /// <summary>
- /// 实践学时
- /// </summary>
- [DisplayName("实践学时")]
- public int? Practicehours { get; set; }
- /// <summary>
- /// 实验学时
- /// </summary>
- [DisplayName("实验学时")]
- public int? Trialhours { get; set; }
- /// <summary>
- /// 总学时
- /// </summary>
- [DisplayName("总学时")]
- public int? Totalhours
- {
- get
- {
- if (TheoryCourse == null)
- TheoryCourse = 0;
- if (Practicehours == null)
- Practicehours = 0;
- return (TheoryCourse + Practicehours);
- //return this.TheoryCourse ?? 0 + this.Practicehours ?? 0 + this.Trialhours ?? 0; }
- }
- }
- /// <summary>
- /// 人数下限
- /// </summary>
- [Required]
- [DisplayName("人数下限")]
- public Nullable<int> PeopleNumlower { get; set; }
- /// <summary>
- /// 人数上限
- /// </summary>
- [Required]
- [DisplayName("人数上限")]
- public Nullable<int> PeopleNumlimit { get; set; }
- [DisplayName("已选人数")]
- public int? StudentTotalNum { get; set; }
- /// <summary>
- /// 学期
- /// </summary>
- [DisplayName("学期")]
- public int? SchoolcodeID { get; set; }
- /// <summary>
- /// 学期
- /// </summary>
- [DisplayName("学期")]
- public string SchoolcodeName
- {
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Semester.ToString()).Where(x => x.Value == SchoolcodeID).Select(x => x.Name).FirstOrDefault();
- }
- }
- /// <summary>
- /// 课程班级
- /// </summary>
- [DisplayName("课程班级")]
- public string ClassName { get; set; }
- /// <summary>
- /// 选修类型ID
- /// </summary>
- [DisplayName("选修类型ID")]
- public int SelectCourseTypeID { get; set; }
- /// <summary>
- /// 选修类型ID,0限选,1任选
- /// </summary>
- [DisplayName("选修类型ID")]
- public int SelectCourseTypeOrderID { get; set; }
- /// <summary>
- /// 选修类型
- /// </summary>
- [DisplayName("选修类型")]
- public string SelectCourseTypeName { get; set; }
- /// <summary>
- /// 已选人数
- /// </summary>
- [DisplayName("已选人数")]
- public int? StudentCount { get; set; }
- /// <summary>
- /// 任课教师ID
- /// </summary>
- [DisplayName("任课教师ID")]
- public string TeacherIDs { get; set; }
- /// <summary>
- /// 任课教师
- /// </summary>
- [DisplayName("任课教师")]
- public string TeacherNames { get; set; }
- /// <summary>
- /// 是否选择
- /// </summary>
- [DisplayName("是否选择")]
- public bool? IsSelected { get; set; }
- [DisplayName("指定节次")]
- public Guid? CoursesTimeID { get; set; }
- [DisplayName("指定节次")]
- public string CoursesTimeName { get; set; }
- [DisplayName("教室")]
- public Guid? ClassroomID { get; set; }
- [DisplayName("教室")]
- public string ClassroomName { get; set; }
-
- public string OperateText {
- get
- {
- return !(this.IsSelected ?? false) ? "选课" : "取消选课";
- }
- }
- [Required]
- [DisplayName("开放状态")]
- public bool IsOpened { get; set; }
- public string IsOpenedDesc
- {
- get { return this.IsOpened == true ? "是" : "否"; }
- }
- public int? RecordStatus { get; set; }
- [DisplayName("状态")]
- public string RecordStatusName
- {
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.EM_SelectCourseResultStatus.ToString())
- .Where(x => x.Value == RecordStatus)
- .Select(x => x.Name).FirstOrDefault();
- }
- }
- /// <summary>
- /// 时间节段
- /// </summary>
- [Required]
- [DisplayName("时间节段")]
- public int? TimesSegment { get; set; }
- /// <summary>
- /// 时间节段
- /// </summary>
- [DisplayName("时间节段")]
- public string TimesSegmentName { get; set; }
- /// <summary>
- /// 星期
- /// </summary>
- public Nullable<int> Weekday { get; set; }
- public string WeekdayName
- {
- get;set;
- }
- [DisplayName("上课时间")]
- public string WeekdayTimesSegmentName { get; set; }
- }
- }
|