Пример #1
0
        void OnTimedEvent(Object source, EventArgs e)
        {
            // every 20 seconds the "Overzicht" panel will be refreshed
            new System.Threading.Thread(() =>
            {
                // Get all unprocessed orders
                orders = order_service
                         .GetAllOrders()
                         .Where(order => order.State == OrderState.None || order.State == OrderState.Started)
                         .ToList();

                RefreshOrders();
            }).Start();
        }
Пример #2
0
        private void Bar_btnOverzicht_Click_1(object sender, EventArgs e)
        {
            SetHightlight(Bar_btnOverzicht);
            Bar_lblActivePanel.Text = "Overzicht";
            HideAllPanels();
            Bar_pnlOverzicht.Show();

            // Get all unprocessed orders
            orders = order_service
                     .GetAllOrders()
                     .Where(order => order.State == OrderState.None || order.State == OrderState.Started)
                     .ToList();

            switch (orders.Count)
            {
            case 0:
                Bar_lblGeenBestellingen.Show();
                break;

            case 1:
                FillFirstOrder(orders[0]);
                break;

            case 2:
                FillSecondOrder(orders[1]);
                goto case 1;

            case 3:
                FillThirdOrder(orders[2]);
                goto case 2;

            case 4:
                FillFourthOrder(orders[3]);
                goto case 3;

            default:
                ShowOverflow(orders.Count - 4);
                goto case 4;
            }
        }
Пример #3
0
        public JsonResult Get()
        {
            var orders = Call_Func.GetAllOrders();

            return(Json(new { orders = orders }, JsonRequestBehavior.AllowGet));
        }