partialBook.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace WpfApp2
  7. {
  8. partial class Book
  9. {
  10. public string Image
  11. {
  12. get
  13. {
  14. return $"..\\{cover}";
  15. }
  16. }
  17. public int Count { get; set; }
  18. public string StoreCount
  19. {
  20. get
  21. {
  22. if (countStrore > 5)
  23. {
  24. return "много";
  25. }
  26. if (countStrore <= 0)
  27. {
  28. return "нет";
  29. }
  30. return countStrore.ToString();
  31. }
  32. }
  33. public string StockCount
  34. {
  35. get
  36. {
  37. if (countStock > 5)
  38. {
  39. return "много";
  40. }
  41. if (countStock <= 0)
  42. {
  43. return "нет";
  44. }
  45. return countStock.ToString();
  46. }
  47. }
  48. }
  49. }