public Portfolio getPrimitive()
        {
            Portfolio toReturn = new Portfolio();
            toReturn.stockCode = this.stockCode.Trim();
            toReturn.stockName = this.stockName;
            toReturn.buyingPrice = this.buyingPrice;
            toReturn.buyingQuantity = this.buyingQuantity;
            toReturn.optimumPercent = 0;

            double.TryParse(this.optimalToPortfolio, out toReturn.optimumPercent);
            return toReturn;
        }
        public Model_ViewPortfolio(Portfolio primitive)
        {
            this.stockCode = primitive.stockCode;
            this.stockName = primitive.stockName;
            this.buyingQuantity = primitive.buyingQuantity;
            this.buyingPrice = primitive.buyingPrice;

            if (primitive.optimumPercent > 0)
            {
                this.optimalToPortfolio = primitive.optimumPercent + "";
            }
            else
            {
                this.optimalToPortfolio = "<Press calculate>";
            }
        }