Пример #1
0
        private void PrepBtn_Click(object sender, EventArgs e)
        {
            if (ordersNotHandledBox.SelectedIndex == -1)
            {
                Console.WriteLine("No order was selected");
                return;
            }

            string[] tokens = ordersNotHandledBox.GetItemText(ordersNotHandledBox.SelectedItem).Split(' ');
            ConnectionObject.UpdateOrderState(Convert.ToInt32(tokens[1]), Convert.ToInt32(tokens[0]), Order.ORDER_STATE.IN_PREPARATION);
        }
Пример #2
0
        private void ReadyBtn_Click(object sender, EventArgs e)
        {
            if (ordersInPreparationBox.SelectedIndex == -1)
            {
                Console.WriteLine("No order was selected");
                return;
            }

            string[] tokens = ordersInPreparationBox.GetItemText(ordersInPreparationBox.SelectedItem).Split(' ');

            //REMOVES THE NOW READY ORDER FROM THE TERMINAL'S STORAGE
            RemoveReceivedOrder(Convert.ToInt32(tokens[0]));
            ConnectionObject.UpdateOrderState(Convert.ToInt32(tokens[1]), Convert.ToInt32(tokens[0]), Order.ORDER_STATE.READY);
        }