OpenControlView.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 EMIS.ViewModel.Cache;
  8. namespace EMIS.ViewModel.ExaminationApply
  9. {
  10. public class OpenControlView
  11. {
  12. /// <summary>
  13. /// ExaminationOpenControlID
  14. /// </summary>
  15. public System.Guid? ExaminationOpenControlID { get; set; }
  16. [Required]
  17. [DisplayName("考试科目")]
  18. public Nullable<System.Guid> ExaminationSubjectID { get; set; }
  19. [Required]
  20. [DisplayName("考试科目")]
  21. public Nullable<System.Guid> ExaminationSubjectEditID { get; set; }
  22. public string ExaminationSubjectName { get; set; }
  23. [Required]
  24. [DisplayName("考试类型")]
  25. public Nullable<System.Guid> ExaminationTypeID { get; set; }
  26. public string ExaminationTypeName { get; set; }
  27. /// <summary>
  28. /// 学生类别
  29. /// </summary>
  30. [Required]
  31. [DisplayName("学生类别")]
  32. public List<int> StudentTypeID { get; set; }
  33. [Required]
  34. [DisplayName("学生类别")]
  35. public Nullable<int> StudentType { get; set; }
  36. public string StudentTypeDesc
  37. {
  38. get
  39. {
  40. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_STUDENTTYPE.ToString())
  41. .Where(x => x.Value == StudentType)
  42. .Select(x => x.Name).FirstOrDefault();
  43. }
  44. }
  45. [Required]
  46. [DisplayName("年级数")]
  47. public Nullable<int> SchoolyearNumID { get; set; }
  48. public string SchoolyearNumName
  49. {
  50. get
  51. {
  52. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString())
  53. .Where(x => x.Value == SchoolyearNumID)
  54. .Select(x => x.Name).FirstOrDefault();
  55. }
  56. }
  57. [Required]
  58. [DisplayName("报名时间起")]
  59. public Nullable<System.DateTime> StartDate { get; set; }
  60. [Required]
  61. [DisplayName("报名时间止")]
  62. public Nullable<System.DateTime> EndDate { get; set; }
  63. [Required]
  64. [DisplayName("限定人数")]
  65. // [RegularExpression(@"^[1-9]{1,3}$", ErrorMessage = "只能输入1至3位整数")]
  66. [RegularExpression(@"^[0-9]\d*$", ErrorMessage = "必须填写正整数")]
  67. public int? PeopleNumLimit { get; set; }
  68. /// <summary>
  69. /// RecordStatus
  70. /// </summary>
  71. public Nullable<int> RecordStatus { get; set; }
  72. /// <summary>
  73. /// CreateTime
  74. /// </summary>
  75. public Nullable<System.DateTime> CreateTime { get; set; }
  76. /// <summary>
  77. /// CreateUserID
  78. /// </summary>
  79. public Nullable<System.Guid> CreateUserID { get; set; }
  80. /// <summary>
  81. /// ModifyUserID
  82. /// </summary>
  83. public Nullable<System.Guid> ModifyUserID { get; set; }
  84. /// <summary>
  85. /// ModifyTime
  86. /// </summary>
  87. public Nullable<System.DateTime> ModifyTime { get; set; }
  88. }
  89. }