public void GenerateBill() { _PersonOrders = All.AllFoodOrders.ElementAt(SelectedIndex); /* foreach(Order O in Orders.ToList()) * { * Orders.Remove(O); * }*/ Orders = _PersonOrders.Orders; CalculateBill(); }
public void PlaceOrder() { AllOrders All = AllOrders.Instance; PersonOrders.OrderID = All.AllFoodOrders.Count + 1; All.AllFoodOrders.Add(PersonOrders); foreach (Order O in Orders.ToList()) { Orders.Remove(O); } PersonOrders = new AllOrderPerPerson(); MessageBox.Show("Order Placed"); }