using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Exam19Apr
{
    public partial class Books
    {
        public string CheckStoreCount
        {
            get
            {
                if (StoreCount > 5)
                    return "Много";
                else if (StoreCount == 0)
                    return "Нет";
                else
                    return StoreCount.ToString();
            }
        }

        public string CheckStockCount
        {
            get
            {
                if (StockCount > 5)
                    return "Много";
                else if (StockCount == 0)
                    return "Нет";
                else
                    return StockCount.ToString();
            }
        }


        public int Sale { get; set; }

        public int FullCount { get; set; }
        public decimal PriceSale
        {
            get
            {
                return Price - Price * (Convert.ToDecimal(Sale) / 100);
            }
        }

        public string VisiblePriceSale
        {
            get
            {
                if (Sale == 0)
                    return "Collapsed";
                else
                    return "Visible";
            }
        }

        public string DecorationPrice
        {
            get
            {
                if (Sale > 0)
                    return "Strikethrough";
                else
                    return "None";
            }
        }
    }
}
