0
0

Product.cs 872 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using wpf_connection3;
  7. namespace wpf_connection3
  8. {
  9. public class Product
  10. {
  11. public int ID { get; set; }
  12. public required string Title { get; set; }
  13. public string? Image { get; set; }
  14. public int ProductTypeID { get; set; }
  15. public required string ProductTypeTitle { get; set; }
  16. public required string ArticleNumber { get; set; }
  17. public double? MaterialCost { get; set; }
  18. public string? MaterialString { get; set; }
  19. public Uri? ImageBitmap
  20. {
  21. get
  22. {
  23. var imageName = Environment.CurrentDirectory + (Image ?? "");
  24. return System.IO.File.Exists(imageName) ? new Uri(imageName) : null;
  25. }
  26. }
  27. }
  28. }