private void btn_refresh_Click(object sender, EventArgs e)
        {
            PendingOrder_Service service      = new PendingOrder_Service();
            List <PendingOrder>  pendingorder = service.GetAllPendingOrders();

            lvOverzicht.Items.Clear();
            foreach (Model.PendingOrder po in pendingorder)
            {
                ListViewItem li = new ListViewItem(po.OrderStatusName);
                li.SubItems.Add(po.TableID.ToString());
                lvOverzicht.Items.Add(li);
            }
        }
        private void FillListView()
        {
            PendingOrder_Service service      = new PendingOrder_Service();
            List <PendingOrder>  pendingorder = service.GetAllPendingOrders();

            lvOverzicht.Items.Clear();
            foreach (Model.PendingOrder po in pendingorder)
            {
                ListViewItem li = new ListViewItem(po.OrderStatusName);
                li.SubItems.Add(po.TableID.ToString());
                lvOverzicht.Items.Add(li);
            }
        }
Exemplo n.º 3
0
        public void RefreshListView()
        {
            PendingOrder_Service service      = new PendingOrder_Service();
            List <PendingOrder>  pendingorder = service.GetAllPendingOrders();

            lvOverzicht.Items.Clear();
            foreach (Model.PendingOrder po in pendingorder)
            {
                if (po.OrderStatusName == "Gereed" || po.OrderStatusName == "Besteld" || po.OrderStatusName == "Wordt bereid")
                {
                    ListViewItem li = new ListViewItem(po.TableID.ToString());
                    li.SubItems.Add(po.OrderStatusName);
                    lvOverzicht.Items.Add(li);
                }
            }
        }
Exemplo n.º 4
0
        private void btn_Annuleren_Click(object sender, EventArgs e)
        {
            if (lvOverzicht.FocusedItem == null)
            {
                MessageBox.Show("Selecteer eerst een tafel uit bovenstaande lijst.", "Foutmelding", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                PendingOrder_Service pservice      = new PendingOrder_Service();
                List <PendingOrder>  pendingorders = pservice.GetAllPendingOrders();
                PendingOrder         pendingOrder  = pendingorders[lvOverzicht.FocusedItem.Index];

                KitchenBar_Service service = KitchenBar_Service.GetBarService();
                service.UpdatebarOrder(pendingOrder.OrderID, btn_Annuleren.Text);

                btn_refresh.PerformClick();
            }
        }