MySelectedQuoteItem.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. namespace Muchinfo.MTPClient.Data.Model.QuoteItem
  2. {
  3. /// <summary>
  4. /// MySelectedQuoteItem类
  5. /// </summary>
  6. public class MySelectedQuoteItem : QuoteItemBase
  7. {
  8. #region Fields
  9. /// <summary>
  10. /// 总额
  11. /// </summary>
  12. private decimal _totalTurnover;
  13. #endregion Fields
  14. #region Properties
  15. #region Public Properties
  16. /// <summary>
  17. /// 总额
  18. /// </summary>
  19. public decimal TotalTurnover
  20. {
  21. get
  22. {
  23. return _totalTurnover;
  24. }
  25. set
  26. {
  27. Set(() => TotalTurnover, ref _totalTurnover, value);
  28. }
  29. }
  30. #endregion Public Properties
  31. #endregion Properties
  32. #region Methods
  33. #region Public Methods
  34. /// <summary>
  35. /// 更新对象属性值(只更新需要字段)
  36. /// </summary>
  37. /// <param name="item">The item.</param>
  38. public override void UpdateFrom(QuoteItemBase item)
  39. {
  40. base.UpdateFrom(item);
  41. var selectedItem = item as MySelectedQuoteItem;
  42. if (selectedItem == null)
  43. {
  44. return;
  45. }
  46. this.TotalTurnover = selectedItem.TotalTurnover;
  47. }
  48. #endregion Public Methods
  49. #endregion Methods
  50. }
  51. }