예제 #1
0
        private void TabControl1_MouseClick(object sender, MouseEventArgs e)
        {
            OrdersList.Items.Clear();
            OrdersList.Refresh();
            foreach (Order order in kitchen.GetOrders())
            {
                var item = new ListViewItem(new string[4] {
                    order.GetId().ToString(),
                    kitchen.CheckOrder(order).ToString(), order.GetDishes().Count().ToString(),
                    order.GetPrice().ToString()
                });

                OrdersList.Items.Add(item);
            }
            ReadyOrdersList.Items.Clear();
            ReadyOrdersList.Refresh();
            foreach (Order order in kitchen.GetReadyOrders())
            {
                var item = new ListViewItem(new string[2] {
                    order.GetId().ToString(), order.GetPrice().ToString()
                });
                ReadyOrdersList.Items.Add(item);
            }
        }