Beispiel #1
0
        public CoinBL(Coin coin, Order order)
        {
            CoinDB = coin;

            if (order != null)
            {
                OrderBL = new OrderBL(order);
            }

            UpdateAllegroData();
        }
Beispiel #2
0
        public void UpdateOrder(OrderBL element)
        {
            if (element != null && GetOrdersBL().Any(x => x.OrderId.Equals(element.OrderId)))
            {
                DB.Orders.Update(element.OrderDB);
                DB.Save();
            }
            else
            {
            }
            //if (element != null)
            //{
            //    Order toUpdate = DB.Orders.Read(element.OrderId);

            //    if (toUpdate != null)
            //    {
            //        toUpdate = Mapper.Map<Order>(element);
            //        DB.Orders.Update(toUpdate);
            //        DB.Save();
            //    }
            //}
        }
Beispiel #3
0
 public void AddOrder(OrderBL element)
 {
     DB.Orders.Create(Mapper.Map <Order>(element));
     DB.Save();
 }