using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace modulekz { public partial class Book { public string CountStore { get { if (Store > 5) { return "Много"; } else if (Store < 1) { return "Нет"; } else { return Store.ToString(); } } set { } } public string CountStock { get { if (Stock > 5) { return "Много"; } else if (Stock < 1) { return "Нет"; } else { return Stock.ToString(); } } set { } } public int inc { get; set; } = 0; public double sale { get; set; } public string NewPrice { get { if (sale > 0) return Math.Floor(Convert.ToDouble(Cost) - Convert.ToDouble(Cost) * (sale / 100)).ToString(); else return ""; } set { } } public decimal OldPrice { get { return Convert.ToDecimal(Cost); } set { } } string d; public string decor { get { if (sale > 0) return d; else return ""; } set { d = "Strikethrough"; } } public int allcount { get { return Stock + Store; } set { } } } }