MobileUserEducationScheduleView.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.ViewModel.EducationManage;
  6. using EMIS.ViewModel.CacheManage;
  7. using EMIS.ViewModel.CalendarManage;
  8. namespace EMIS.ViewModel.EducationSchedule
  9. {
  10. public class MobileUserEducationScheduleView
  11. {
  12. /// <summary>
  13. /// 学年学期
  14. /// </summary>
  15. public Nullable<System.Guid> SchoolyearID { get; set; }
  16. /// <summary>
  17. /// 学年学期
  18. /// </summary>
  19. public string SchoolyearCode { get; set; }
  20. /// <summary>
  21. /// 课程ID
  22. /// </summary>
  23. public Guid? CoursematerialID { get; set; }
  24. /// <summary>
  25. /// 课程名称
  26. /// </summary>
  27. public string CoursematerialName { get; set; }
  28. /// <summary>
  29. /// 授课方式
  30. /// </summary>
  31. public int? TeachingModeID { get; set; }
  32. public string TeachingModeName
  33. {
  34. get
  35. {
  36. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString())
  37. .Where(x => x.Value == TeachingModeID)
  38. .Select(x => x.Name).FirstOrDefault();
  39. }
  40. }
  41. /// <summary>
  42. /// 星期
  43. /// </summary>
  44. public Nullable<int> Weekday { get; set; }
  45. /// <summary>
  46. /// 课程时间
  47. /// </summary>
  48. public Nullable<int> TimeGroup { get; set; }
  49. /// <summary>
  50. /// 课程时间
  51. /// </summary>
  52. public List<BaseWorkTimeView> CoursesTimeList { get; set; }
  53. public string TimeGroupName
  54. {
  55. get
  56. {
  57. return "<" + CoursesTimeList.Min(x => x.StartTimes).ToString() + "-" + CoursesTimeList.Max(x => x.EndTimes).ToString() + "节>";
  58. }
  59. }
  60. /// <summary>
  61. /// 课程时间视图
  62. /// </summary>
  63. public string TimeName
  64. {
  65. get
  66. {
  67. return CoursesTimeList.Min(x => new TimeSpan(x.StartHour, x.StartMinutes, 0)).ToString(@"hh\:mm")
  68. + "-" + CoursesTimeList.Max(x => new TimeSpan(x.EndHour, x.EndMinutes, 0)).ToString(@"hh\:mm");
  69. }
  70. }
  71. /// <summary>
  72. /// ClassroomID
  73. /// </summary>
  74. public Nullable<System.Guid> ClassroomID { get; set; }
  75. public string ClassroomName { get; set; }
  76. ///// <summary>
  77. ///// 教师列表
  78. ///// </summary>
  79. //public List<BaseTeacherTeachingView> TeacherTeachingViewList { get; set; }
  80. //public string TeacherNames
  81. //{
  82. // get
  83. // {
  84. // return string.Join(",", TeacherTeachingViewList.Select(x => x.Name).Distinct().ToList());
  85. // }
  86. //}
  87. }
  88. }