Exemplo n.º 1
0
 private void LoadOrderBookList(DateTime dateTime)
 {
     if (orderBooks.Count(e => e.DateTime == dateTime) == 0)
     {
         var entity = new OrderBookDao(connection).GetByDateTime(dateTime);
         orderBookList.Items.Insert(0, entity.DateTime);
         orderBooks.Insert(0, entity);
     }
 }
Exemplo n.º 2
0
 private void LoadOrderBookList(string instrument)
 {
     orderBookList.Items.Clear();
     if (orderBooks.ContainsKey(instrument) == false)
     {
         orderBooks[instrument] = new OrderBookDao(connection).GetByInstrumentOrderByDateTimeDescendant(instrument).ToList();
     }
     foreach (var entity in orderBooks[instrument])
     {
         orderBookList.Items.Add(entity.DateTime);
     }
 }
Exemplo n.º 3
0
        private void LoadOrderBookList(string instrument, DateTime dateTime)
        {
            if (orderBooks.ContainsKey(instrument) == false)
            {
                return;
            }
            var list = orderBooks[instrument];

            if (list.Count(e => e.DateTime == dateTime) == 0)
            {
                var entity = new OrderBookDao(connection).GetByInstrumentAndDateTime(instrument, dateTime);
                orderBookList.Items.Insert(0, entity.DateTime);
                list.Insert(0, entity);
            }
        }