SupplierDiscountSetView.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. namespace EMIS.ViewModel.TeachingMaterial
  8. {
  9. public class SupplierDiscountSetView
  10. {
  11. /// <summary>
  12. /// 供应商折扣率设置ID
  13. /// </summary>
  14. [DisplayName("供应商折扣率设置ID")]
  15. public Guid SupplierDiscountSetID { get; set; }
  16. /// <summary>
  17. /// 供应商编号
  18. /// </summary>
  19. [DisplayName("供应商编号")]
  20. public string UnitCode { get; set; }
  21. /// <summary>
  22. /// 出版社ID
  23. /// </summary>
  24. [Required]
  25. [DisplayName("出版社")]
  26. public Guid? PublishID { get; set; }
  27. /// <summary>
  28. /// 供应商名称
  29. /// </summary>
  30. [DisplayName("供应商")]
  31. public string UnitName { get; set; }
  32. /// <summary>
  33. /// 是否默认
  34. /// </summary>
  35. [DisplayName("是否默认")]
  36. public bool IsDefault { get; set; }
  37. public string IsDefaultName {
  38. get {
  39. return IsDefault ? "是" : "否";
  40. }
  41. }
  42. /// <summary>
  43. /// 折扣率
  44. /// </summary>
  45. [Required]
  46. [DisplayName("折扣率")]
  47. [RegularExpression(@"[\d]?(\.[\d]{0,2})?", ErrorMessage = "必须填写小数值")]
  48. public decimal? Discount { get; set; }
  49. }
  50. }