예제 #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;
 }
예제 #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));
        }
예제 #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);
        }
예제 #4
0
 public void UpdateOrder(Order i)
 {
     Data.FactoryManager m = new Data.FactoryManager();
     m.GetOrderManager().Update(i.OrderId, i.Description, i.Quantity);
 }
예제 #5
0
 public void DeleteOrder(int orderId)
 {
     Data.FactoryManager m = new Data.FactoryManager();
     m.GetOrderManager().Delete(orderId);
 }