LevelStandardView.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. namespace EMIS.ViewModel.PaymentManage
  9. {
  10. public class LevelStandardView
  11. {
  12. public Guid LevelStandardID { get; set; }
  13. [DisplayName("聘任类别")]
  14. public int? EmploymentTypeID { get; set; }
  15. public string EmploymentTypeDesc
  16. {
  17. get
  18. {
  19. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_EmploymentType.ToString())
  20. .Where(x => x.Value == EmploymentTypeID)
  21. .Select(x => x.Name).FirstOrDefault();
  22. }
  23. }
  24. [Required]
  25. [DisplayName("课酬级别")]
  26. public int? PaymentLevelID { get; set; }
  27. public string PaymentLevelDesc
  28. {
  29. get
  30. {
  31. return IdNameExt.GetDictionaryItem(DictionaryItem.TP_PaymentLevel.ToString())
  32. .Where(x => x.Value == PaymentLevelID)
  33. .Select(x => x.Name).FirstOrDefault();
  34. }
  35. }
  36. [Required]
  37. [DisplayName("教师类型")]
  38. public int? TeacherType { get; set; }
  39. public string TeacherTypeDesc
  40. {
  41. get
  42. {
  43. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeacherType.ToString())
  44. .Where(x => x.Value == TeacherType)
  45. .Select(x => x.Name).FirstOrDefault();
  46. }
  47. }
  48. [Required]
  49. [DisplayName("标准课酬")]
  50. [RegularExpression(@"^\d+(\.\d{1,2})?$", ErrorMessage = "请输入整数或保留2位小数")]
  51. public decimal? Amount { get; set; }
  52. }
  53. }