PaymentStandardView.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 PaymentStandardView
  11. {
  12. public Guid PaymentStandardID { get; set; }
  13. [Required]
  14. [DisplayName("职称")]
  15. public int? TitleID { get; set; }
  16. public string TitleDesc
  17. {
  18. get
  19. {
  20. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Title.ToString())
  21. .Where(x => x.Value == TitleID)
  22. .Select(x => x.Name).FirstOrDefault();
  23. }
  24. }
  25. [Required]
  26. [DisplayName("教师类型")]
  27. public int? TeacherType { get; set; }
  28. public string TeacherTypeDesc
  29. {
  30. get
  31. {
  32. return IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeacherType.ToString())
  33. .Where(x => x.Value == TeacherType)
  34. .Select(x => x.Name).FirstOrDefault();
  35. }
  36. }
  37. [Required]
  38. [DisplayName("标准课酬")]
  39. [RegularExpression(@"^\d+(\.\d{1,2})?$", ErrorMessage = "请输入整数或保留2位小数")]
  40. public decimal? Amount { get; set; }
  41. }
  42. }