Partial.cs 851 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Eight
  7. {
  8. public partial class Product
  9. {
  10. public string NDescription => Description == null ? "" : Description;
  11. public decimal Cost => ProductMaterial.Sum(x => x.Material.Cost);
  12. public string ImagePath => Image == null ? Environment.CurrentDirectory + @"\products\picture.png" : Environment.CurrentDirectory + Image;
  13. //{
  14. // get
  15. // {
  16. // if (Image == null)
  17. // {
  18. // return Environment.CurrentDirectory + @"\products\picture.png";
  19. // }
  20. // else
  21. // {
  22. // return Environment.CurrentDirectory + Image;
  23. // }
  24. // }
  25. //}
  26. }
  27. }