using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EMIS.ViewModel.EducationManage;
using EMIS.ViewModel.CacheManage;
using EMIS.ViewModel.CalendarManage;
namespace EMIS.ViewModel.EducationSchedule
{
public class MobileUserEducationScheduleView
{
///
/// 学年学期
///
public Nullable SchoolyearID { get; set; }
///
/// 学年学期
///
public string SchoolyearCode { get; set; }
///
/// 课程ID
///
public Guid? CoursematerialID { get; set; }
///
/// 课程名称
///
public string CoursematerialName { get; set; }
///
/// 授课方式
///
public int? TeachingModeID { get; set; }
public string TeachingModeName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString())
.Where(x => x.Value == TeachingModeID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 星期
///
public Nullable Weekday { get; set; }
///
/// 课程时间
///
public Nullable TimeGroup { get; set; }
///
/// 课程时间
///
public List CoursesTimeList { get; set; }
public string TimeGroupName
{
get
{
return "<" + CoursesTimeList.Min(x => x.StartTimes).ToString() + "-" + CoursesTimeList.Max(x => x.EndTimes).ToString() + "节>";
}
}
///
/// 课程时间视图
///
public string TimeName
{
get
{
return CoursesTimeList.Min(x => new TimeSpan(x.StartHour, x.StartMinutes, 0)).ToString(@"hh\:mm")
+ "-" + CoursesTimeList.Max(x => new TimeSpan(x.EndHour, x.EndMinutes, 0)).ToString(@"hh\:mm");
}
}
///
/// ClassroomID
///
public Nullable ClassroomID { get; set; }
public string ClassroomName { get; set; }
/////
///// 教师列表
/////
//public List TeacherTeachingViewList { get; set; }
//public string TeacherNames
//{
// get
// {
// return string.Join(",", TeacherTeachingViewList.Select(x => x.Name).Distinct().ToList());
// }
//}
}
}