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