WorktimeRateView.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.ViewModel.CacheManage;
  6. using System.ComponentModel.DataAnnotations;
  7. using System.ComponentModel;
  8. namespace EMIS.ViewModel.PaymentManage
  9. {
  10. public class WorktimeRateView
  11. {
  12. /// <summary>
  13. /// WorktimeRateID
  14. /// </summary>
  15. public System.Guid WorktimeRateID { get; set; }
  16. [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
  17. public Nullable<System.Guid> CollegeID { get; set; }
  18. public string CollegeNo { get; set; }
  19. public string CollegeName { get; set; }
  20. [Required]
  21. [DisplayName("授课方式")]
  22. public Nullable<int> TeachingModeID { get; set; }
  23. public string TeachingModeDesc
  24. {
  25. get
  26. {
  27. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString())
  28. .Where(x => x.Value == TeachingModeID)
  29. .Select(x => x.Name).FirstOrDefault();
  30. }
  31. }
  32. [DisplayName("任课方式")]
  33. public Nullable<int> TeachingMethodID { get; set; }
  34. public string TeachingMethodDesc
  35. {
  36. get
  37. {
  38. return IdNameExt.GetDictionaryItem(DictionaryItem.EM_TeachingMethod.ToString())
  39. .Where(x => x.Value == TeachingMethodID)
  40. .Select(x => x.Name).FirstOrDefault();
  41. }
  42. }
  43. [Required]
  44. [DisplayName("课酬级别")]
  45. public Nullable<int> PaymentLevelID { get; set; }
  46. public string PaymentLevelDesc
  47. {
  48. get
  49. {
  50. return IdNameExt.GetDictionaryItem(DictionaryItem.TP_PaymentLevel.ToString())
  51. .Where(x => x.Value == PaymentLevelID)
  52. .Select(x => x.Name).FirstOrDefault();
  53. }
  54. }
  55. [Required]
  56. [DisplayName("人数(起)")]
  57. public Nullable<int> StudentCountStart { get; set; }
  58. [DisplayName("人数(止)")]
  59. public Nullable<int> StudentCountEnd { get; set; }
  60. [Required]
  61. [DisplayName("系数")]
  62. [RegularExpression(@"^\d+(\.\d{1,2})?$")]
  63. public Nullable<decimal> WorktimeRate { get; set; }
  64. }
  65. }