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

namespace ExamBoldin
{
    public partial class BookShop
    {
        public string CheckCountStore
        {
            get
            {
                if (CountStore > 5)
                    return "Много";
                else if (CountStore == 0)
                    return "Нет";
                else
                    return CountStore.ToString();
            }
        }

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

        private int sale;
        public int Sale
        {
            set
            {
                sale = value;
            }
            get
            { return sale; }
        }

        private int allCount;
        public int AllCount
        {
            set { allCount = value; }
            get { return allCount; }
        }

        public decimal CostSale
        {
            get
            {
                return Cost - Cost * (Convert.ToDecimal(Sale) / 100);
            }
        }

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

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