12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- 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";
- }
- }
- }
- }
|