LessonRecordView.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel;
  6. using System.ComponentModel.DataAnnotations;
  7. using Bowin.Common.Utility;
  8. namespace EMIS.ViewModel.SupervisionManage
  9. {
  10. public class LessonRecordView
  11. {
  12. /// <summary>
  13. /// LessonRecordID
  14. /// </summary>
  15. public System.Guid LessonRecordID { get; set; }
  16. [Required]
  17. [DisplayName("学年学期")]
  18. public Guid? SchoolyearID { get; set; }
  19. public string SchoolyearCode { get; set; }
  20. public string SupervisionTypeDesc
  21. {
  22. get
  23. {
  24. return "督导听课";
  25. }
  26. }
  27. [Required]
  28. [DisplayName("督导时间")]
  29. public Nullable<System.DateTime> LessonDate { get; set; }
  30. public string LessonDateDesc
  31. {
  32. get
  33. {
  34. return (LessonDate.HasValue ? LessonDate.Value.ToString("yyyy-MM-dd") : "") + WeekdayDesc + CoursesTimeDesc;
  35. }
  36. }
  37. [Required]
  38. [DisplayName("督导地点")]
  39. public string Location { get; set; }
  40. [Required]
  41. [DisplayName("督导院系")]
  42. public Nullable<System.Guid> SupervisionCollegeID { get; set; }
  43. public string SupervisionCollegeName { get; set; }
  44. [Required]
  45. [DisplayName("督导对象")]
  46. public Nullable<System.Guid> UserID { get; set; }
  47. public string UserName { get; set; }
  48. [DisplayName("授课班级")]
  49. public Nullable<System.Guid> ClassmajorID { get; set; }
  50. public string ClassmajorName { get; set; }
  51. [Required]
  52. [DisplayName("课程名称")]
  53. public Nullable<System.Guid> CoursematerialID { get; set; }
  54. public string CourseName { get; set; }
  55. [Required]
  56. [DisplayName("星期")]
  57. public Nullable<int> Weekday { get; set; }
  58. public string WeekdayDesc
  59. {
  60. get
  61. {
  62. if (Weekday.HasValue)
  63. {
  64. return WeekHelper.WeekDictionary[Weekday.Value];
  65. }
  66. else
  67. {
  68. return "";
  69. }
  70. }
  71. }
  72. [Required]
  73. [DisplayName("节次")]
  74. public Nullable<System.Guid> CoursesTimeID { get; set; }
  75. public Nullable<int> StartTimes { get; set; }
  76. public Nullable<int> EndTimes { get; set; }
  77. public string CoursesTimeDesc
  78. {
  79. get
  80. {
  81. return string.Format("第{0}-{1}节", StartTimes.HasValue ? StartTimes.Value.ToString() : "", EndTimes.HasValue ? EndTimes.Value.ToString() : "");
  82. }
  83. }
  84. [Required]
  85. [DisplayName("评分(0-100)")]
  86. [RegularExpression(@"^\d+(\.\d{1,2})?$", ErrorMessage = "请输整数或保留2位小数")]
  87. [DisplayFormat(DataFormatString = "#0.##")]
  88. public Nullable<decimal> TotalScore { get; set; }
  89. [Required]
  90. [DisplayName("督导情况记录")]
  91. //[MinLength(100, ErrorMessage = "字数不够")]
  92. public string Content { get; set; }
  93. [Required]
  94. [DisplayName("督导评价建议")]
  95. //[MinLength(60, ErrorMessage = "字数不够")]
  96. public string Record { get; set; }
  97. [Required]
  98. [DisplayName("督导员")]
  99. public Nullable<System.Guid> CreateUserID { get; set; }
  100. public string CreateUserName { get; set; }
  101. public Nullable<System.Guid> CollegeID { get; set; }
  102. }
  103. }