public void RemoveStockFromPortfolio(string inPortfolioID, string inStockName, int numberOfShares) { Portfolio portfolio = this.getPortfolioFromStockExchange(inPortfolioID); string unifiedName = unifyName(inStockName); portfolio.RemoveStockFromPortfolio(unifiedName, numberOfShares); this.soldStocks [unifiedName] += numberOfShares; }
public void RemoveStockFromPortfolio(string inPortfolioID, string inStockName) { Portfolio portfolio = this.getPortfolioFromStockExchange(inPortfolioID); string unifiedName = unifyName(inStockName); int stocksToRemove = portfolio.NumberOfSharesOfStockInPortfolio(unifiedName); portfolio.RemoveStockFromPortfolio(unifiedName); this.soldStocks [unifiedName] += stocksToRemove; }