Beispiel #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;
 }
Beispiel #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));
        }
Beispiel #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);
        }
Beispiel #4
0
 private void GetCustomer()
 {
     Data.FactoryManager m = new Data.FactoryManager();
     Data.Customer       i = m.GetCustomerManager().FindByOrder(this.OrderId);
     customer = new Customer(i.CustomerId, i.FirstName, i.LastName);
 }
Beispiel #5
0
 public void UpdateOrder(Order i)
 {
     Data.FactoryManager m = new Data.FactoryManager();
     m.GetOrderManager().Update(i.OrderId, i.Description, i.Quantity);
 }
Beispiel #6
0
 public void DeleteOrder(int orderId)
 {
     Data.FactoryManager m = new Data.FactoryManager();
     m.GetOrderManager().Delete(orderId);
 }