SubjectCountLimitView.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.Cache;
  8. namespace EMIS.ViewModel.ExaminationApply
  9. {
  10. public class SubjectCountLimitView
  11. {
  12. /// <summary>
  13. /// ExaminationSubjectCountLimitID
  14. /// </summary>
  15. public System.Guid? ExaminationSubjectCountLimitID { get; set; }
  16. [Required]
  17. [DisplayName("考试类型")]
  18. public Nullable<System.Guid> ExaminationTypeID { get; set; }
  19. public string ExaminationTypeName { get; set; }
  20. [Required]
  21. [DisplayName("院系专业")]
  22. public Nullable<System.Guid> FacultymajorID { get; set; }
  23. public string FacultymajorName { get; set; }
  24. [Required]
  25. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
  26. public Guid? CollegeID { get; set; }
  27. [Required]
  28. [DisplayName("年级数")]
  29. public Nullable<int> Years { get; set; }
  30. [DisplayName("报名门数")]
  31. [RegularExpression(@"^[1-9]\d*$", ErrorMessage = "必须填写正整数")]
  32. public Nullable<int> SubjectCountLimit { get; set; }
  33. /// <summary>
  34. /// RecordStatus
  35. /// </summary>
  36. public Nullable<int> RecordStatus { get; set; }
  37. /// <summary>
  38. /// CreateTime
  39. /// </summary>
  40. public Nullable<System.DateTime> CreateTime { get; set; }
  41. /// <summary>
  42. /// CreateUserID
  43. /// </summary>
  44. public Nullable<System.Guid> CreateUserID { get; set; }
  45. /// <summary>
  46. /// ModifyUserID
  47. /// </summary>
  48. public Nullable<System.Guid> ModifyUserID { get; set; }
  49. /// <summary>
  50. /// ModifyTime
  51. /// </summary>
  52. public Nullable<System.DateTime> ModifyTime { get; set; }
  53. public string SchoolyearNumName
  54. {
  55. get
  56. {
  57. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString())
  58. .Where(x => x.Value == Years)
  59. .Select(x => x.Name).FirstOrDefault();
  60. }
  61. }
  62. }
  63. }