public void RefreshView() { Menu.Clear(); Clients.Clear(); ActiveOrders.Clear(); CompletedOrders.Clear(); ActiveDelivery.Clear(); CompletedDeliveries.Clear(); foreach (DishDTG dish in restaurantManager.GetMenu()) { Menu.Add(new DishModel(dish)); } foreach (ClientDTG client in restaurantManager.GetAllClients()) { Clients.Add(new ClientModel(client)); } foreach (OrderDTG order in restaurantManager.GetActiveOrders()) { ActiveOrders.Add(new OrderModel(order)); } foreach (OrderDTG order in restaurantManager.GetCompletedOrders()) { CompletedOrders.Add(new OrderModel(order)); } foreach (OrderDTG order in restaurantManager.GetActiveDeliveries()) { ActiveDelivery.Add(new OrderModel(order)); } foreach (OrderDTG order in restaurantManager.GetCompletedDeliveries()) { CompletedDeliveries.Add(new OrderModel(order)); } }
public void RefreshView() { Menu.Clear(); Clients.Clear(); ActiveOrders.Clear(); CompletedOrders.Clear(); ActiveDelivery.Clear(); CompletedDeliveries.Clear(); foreach (Dish dish in restaurantManager.GetMenu()) { Menu.Add(dish); } foreach (Client client in restaurantManager.GetAllClients()) { Clients.Add(client); } foreach (Order order in restaurantManager.GetActiveOrders()) { ActiveOrders.Add(order); } foreach (Order order in restaurantManager.GetCompletedOrders()) { CompletedOrders.Add(order); } foreach (Order order in restaurantManager.GetActiveDeliveries()) { ActiveDelivery.Add(order); } foreach (Order order in restaurantManager.GetCompletedDeliveries()) { CompletedDeliveries.Add(order); } }