示例#1
0
        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;
        }
示例#2
0
        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;
        }