StudentExaminationCourseView.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.ComponentModel;
  7. using EMIS.ViewModel.CacheManage;
  8. using EMIS.Entities;
  9. namespace EMIS.ViewModel.ExaminationManage
  10. {
  11. public class StudentExaminationCourseView
  12. {
  13. /// <summary>
  14. /// ExaminationPlanID
  15. /// </summary>
  16. public System.Guid ExaminationPlanID { get; set; }
  17. [DisplayName("学年学期")]
  18. public Nullable<System.Guid> SchoolyearID { get; set; }
  19. public string SchoolyearCode { get; set; }
  20. [DisplayName("考试科目")]
  21. public Nullable<System.Guid> CoursematerialID { get; set; }
  22. public string CoursematerialName { get; set; }
  23. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  24. public Guid? CollegeID { get; set; }
  25. public string CollegeName { get; set; }
  26. [DisplayName("考试方式")]
  27. public Nullable<int> ExaminationModeID { get; set; }
  28. public string ExaminationModeName
  29. {
  30. get
  31. {
  32. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString())
  33. .Where(x => x.Value == ExaminationModeID)
  34. .Select(x => x.Name).FirstOrDefault();
  35. }
  36. }
  37. [DisplayName("考试形式")]
  38. public Nullable<int> ExaminationStyleID { get; set; }
  39. public string ExaminationStyleName
  40. {
  41. get
  42. {
  43. return IdNameExt.GetDictionaryItem(DictionaryItem.EX_ExaminationStyle.ToString())
  44. .Where(x => x.Value == ExaminationStyleID)
  45. .Select(x => x.Name).FirstOrDefault();
  46. }
  47. }
  48. [DisplayName("考试性质")]
  49. public Nullable<int> ExamsCategoryID { get; set; }
  50. public string ExamsCategoryName
  51. {
  52. get
  53. {
  54. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsCategory.ToString())
  55. .Where(x => x.Value == ExamsCategoryID)
  56. .Select(x => x.Name).FirstOrDefault();
  57. }
  58. }
  59. public Nullable<Guid> EducationMissionID { get; set; }
  60. [DisplayName("考试日期")]
  61. public Nullable<System.DateTime> ExaminationDate { get; set; }
  62. [DisplayName("开始时间")]
  63. public Nullable<System.TimeSpan> StartTime { get; set; }
  64. public string StartTimeStr
  65. {
  66. get
  67. {
  68. if (StartTime.HasValue)
  69. {
  70. if (StartTime.Value.Minutes == 0)
  71. {
  72. return StartTime.Value.Hours + ":00";
  73. }
  74. else
  75. {
  76. return StartTime.Value.Hours + ":" + StartTime.Value.Minutes;
  77. }
  78. }
  79. else
  80. {
  81. return null;
  82. }
  83. }
  84. }
  85. [DisplayName("结束时间")]
  86. public Nullable<System.TimeSpan> EndTime { get; set; }
  87. public string EndTimeStr
  88. {
  89. get
  90. {
  91. if (EndTime.HasValue)
  92. {
  93. if (EndTime.Value.Minutes == 0)
  94. {
  95. return EndTime.Value.Hours + ":00";
  96. }
  97. else
  98. {
  99. return EndTime.Value.Hours + ":" + EndTime.Value.Minutes;
  100. }
  101. }
  102. else
  103. {
  104. return null;
  105. }
  106. }
  107. }
  108. public string ExaminationTime
  109. {
  110. get
  111. {
  112. return (StartTime.HasValue && EndTime.HasValue) ? StartTime.Value.ToString("hh\\:mm") + "-" + EndTime.Value.ToString("hh\\:mm") : "";
  113. }
  114. }
  115. /// <summary>
  116. /// 课程结束周次
  117. /// </summary>
  118. public int? CourseEndWeekNum { get; set; }
  119. //public CF_Classroom CF_Classroom { get; set; }
  120. public string ClassroomNames { get; set; }
  121. /// <summary>
  122. /// RecordStatus
  123. /// </summary>
  124. public Nullable<int> RecordStatus { get; set; }
  125. public string RecordStatusDesc
  126. {
  127. get
  128. {
  129. return IdNameExt.GetDictionaryItem(DictionaryItem.EX_ExaminationPlanStatus.ToString())
  130. .Where(x => x.Value == RecordStatus)
  131. .Select(x => x.Name).FirstOrDefault();
  132. }
  133. }
  134. /// CreateTime
  135. /// </summary>
  136. public Nullable<System.DateTime> CreateTime { get; set; }
  137. /// <summary>
  138. /// CreateUserID
  139. /// </summary>
  140. public Nullable<System.Guid> CreateUserID { get; set; }
  141. /// <summary>
  142. /// ModifyUserID
  143. /// </summary>
  144. public Nullable<System.Guid> ModifyUserID { get; set; }
  145. /// <summary>
  146. /// ModifyTime
  147. /// </summary>
  148. public Nullable<System.DateTime> ModifyTime { get; set; }
  149. }
  150. }