Exemplo n.º 1
0
 public void Refresh()
 {
     Data.FactoryManager m = new Data.FactoryManager();
     Data.Order          i = m.GetOrderManager().Find(this.OrderId);
     this.description = i.Description;
     this.quantity    = i.Quantity;
 }
Exemplo n.º 2
0
        public int AddOrder(string orderDescription, int quantity)
        {
            Data.FactoryManager m         = new Data.FactoryManager();
            DateTime            orderDate = DateTime.Now;

            return(m.GetOrderManager().Add(orderDescription, quantity, this.CustomerId));
        }
Exemplo n.º 3
0
        private List <Order> GetOrders()
        {
            List <Order> orders = new List <Order>();

            Data.FactoryManager m = new Data.FactoryManager();
            foreach (Data.Order i in m.GetOrderManager().FindByCustomer(this.CustomerId))
            {
                orders.Add(new Order(i.OrderId, i.Description, i.Quantity));
            }
            return(orders);
        }
Exemplo n.º 4
0
 public void UpdateOrder(Order i)
 {
     Data.FactoryManager m = new Data.FactoryManager();
     m.GetOrderManager().Update(i.OrderId, i.Description, i.Quantity);
 }
Exemplo n.º 5
0
 public void DeleteOrder(int orderId)
 {
     Data.FactoryManager m = new Data.FactoryManager();
     m.GetOrderManager().Delete(orderId);
 }