PartBooks.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace ExamBoldin
  7. {
  8. public partial class BookShop
  9. {
  10. public string CheckCountStore
  11. {
  12. get
  13. {
  14. if (CountStore > 5)
  15. return "Много";
  16. else if (CountStore == 0)
  17. return "Нет";
  18. else
  19. return CountStore.ToString();
  20. }
  21. }
  22. public string CheckCountStock
  23. {
  24. get
  25. {
  26. if (CountStock > 5)
  27. return "Много";
  28. else if (CountStock == 0)
  29. return "Нет";
  30. else
  31. return CountStock.ToString();
  32. }
  33. }
  34. private int sale;
  35. public int Sale
  36. {
  37. set
  38. {
  39. sale = value;
  40. }
  41. get
  42. { return sale; }
  43. }
  44. private int allCount;
  45. public int AllCount
  46. {
  47. set { allCount = value; }
  48. get { return allCount; }
  49. }
  50. public decimal CostSale
  51. {
  52. get
  53. {
  54. return Cost - Cost * (Convert.ToDecimal(Sale) / 100);
  55. }
  56. }
  57. public string VisibleCostSale
  58. {
  59. get
  60. {
  61. if (Sale == 0)
  62. return "Collapsed";
  63. else
  64. return "Visible";
  65. }
  66. }
  67. public string DecorCost
  68. {
  69. get
  70. {
  71. if (Sale > 0)
  72. return "Strikethrough";
  73. else
  74. return "None";
  75. }
  76. }
  77. }
  78. }