public void Count() { Cost = Thing.PriceOfProduct.GetGross(); Cost.Value *= Volume; Value = Cost.Value; NameOfCurrency = Cost.NameOfCurrency; }
public Item(Product.Product product, int vol) { this.Thing = product; ChangeVolume(vol); Cost = new Product.Money(0.0f, Product.Waluta.PLN); Value = Cost.Value; NameOfCurrency = Cost.NameOfCurrency; IdProdukt = Thing.IDProduct; }
public Item() { Random rand = new Random(); Cost = new Product.Money(); Thing = new Product.Product(); Volume = rand.Next(1, 100); IdProdukt = rand.Next(1, 100); Value = Cost.Value; NameOfCurrency = Cost.NameOfCurrency; }
public void Count(Client.Discount dis) { if (Thing.IDProduct == dis.IdProduct) { if (dis.Type == Client.Bonus.Netto) { Cost = Thing.PriceOfProduct.NetPrice; Cost.Value *= Volume; } if (dis.Type == Client.Bonus.Zniżka) { Cost = Thing.PriceOfProduct.NetPrice; Cost.Value *= Volume; Cost.Value *= (float)(1.0f - dis.ValueOfBonus); } Value = Cost.Value; NameOfCurrency = Cost.NameOfCurrency; } else { throw new Exception("Nie ta zniżka.\n"); } }