1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- 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 { }
- }
- }
- }
|