Exemple #1
0
        private Ticker ConvertToModel(TickerDto tickerDto)
        {
            var ticker = new Ticker();

            ticker.Active = tickerDto.Active;
            ticker.BCFirstDate = tickerDto.BCFirstDate;
            ticker.BH = tickerDto.BH;
            // public System.Data.Objects.DataClasses.EntityCollection<Buy> Buys { get; set; }
            ticker.CBSFirstDate = tickerDto.CBSFirstDate;
            ticker.Comments = tickerDto.Comments;
            ticker.component = tickerDto.component;
            ticker.current = tickerDto.current;
            ticker.DateAdded = tickerDto.DateAdded;
            ticker.DateModified = tickerDto.DateModified;
            ticker.endDate = tickerDto.endDate;
            ticker.FirstBuy = tickerDto.FirstBuy;
            ticker.Id = tickerDto.Id;
            ticker.InceptionDate = tickerDto.InceptionDate;
            ticker.LastSell = tickerDto.LastSell;
            ticker.MCFirstDate = tickerDto.MCFirstDate;
            ticker.Name = tickerDto.Name;
            ticker.priceDecimal = tickerDto.priceDecimal;
            // public System.Data.Objects.DataClasses.EntityCollection<Sell> Sells { get; set; }
            ticker.shareDecimal = tickerDto.shareDecimal;
            ticker.startDate = tickerDto.startDate;
            ticker.Symbol = tickerDto.Symbol;
            ticker.TickerBC = tickerDto.TickerBC;
            ticker.TickerBH = tickerDto.TickerBH;
            ticker.tickerGUID = tickerDto.tickerGUID;
            ticker.TickerYahoo = tickerDto.TickerYahoo;
            ticker.type = tickerDto.Type;

            return ticker;
        }
Exemple #2
0
        private TickerDto ConvertToDto(AccountTicker accountTicker)
        {
            var tickerDto = new TickerDto();

            tickerDto.Symbol = accountTicker.Ticker1.Symbol;
            tickerDto.Id = accountTicker.TickerId;
            tickerDto.Name = accountTicker.Ticker1.Name;
            tickerDto.Type = accountTicker.Ticker1.type;

            return tickerDto;
        }