private void Calculating() { if (SelectedIdBoat != null) { DepositPayed = 0; ContractTotalPrice = 0; ContractTotalPriceInclVAT = 0; _boat = _eF.GetBoat((int)SelectedIdBoat); ContractTotalPrice = _boat.BasePrice; ContractTotalPriceInclVAT = (int)((double)_boat.BasePrice + ((double)_boat.BasePrice * (double)_boat.VAT)); _listSelectedAccessories.ForEach(lsa => { ContractTotalPrice += lsa.Price; ContractTotalPriceInclVAT += (int)((double)lsa.Price + ((double)lsa.Price * (double)lsa.VAT)); }); DepositPayed = (int)((double)ContractTotalPrice / (double)3); } }