Ejemplo n.º 1
0
        private void GuestCountListBox_Click(object sender, EventArgs e)
        {
            TblOrders newOrder = new TblOrders {
                Guests = (int)GuestCountListBox.SelectedItem, TableID = current_table.TableID, EmployeeID = currentEmployee.EmployeeID, OrderState = "Open", Datetime = DateTime.Now
            };

            res_db.TblOrders.Add(newOrder);
            res_db.SaveChanges();


            UpdateCurrentTableOpenOrders();
            OrdersListBox.SelectedItem = open_orders_binding_list[open_orders_binding_list.Count - 1];
            order_items_binding_list.Clear();

            current_open_order = (TblOrders)OrdersListBox.SelectedItem;
            OrderNrLabel.Text  = "#" + current_open_order.OrderID.ToString();
            if (show_billingPanel == false)
            {
                TablesButton.Show();
                OrdersButton.Show();
                TableLabel.Show();
                OrderNrLabel.Show();
                OrderNrLabel.BringToFront();
                show_billingPanel = true;
            }
            BillingPanel.BringToFront();
            show_ordersPanel = false;
        }
Ejemplo n.º 2
0
        private void TableButton_Click(object sender, EventArgs e)
        {
            Button table_button = (Button)sender;

            current_table.TableID = Int32.Parse(table_button.Text);



            UpdateCurrentTableOpenOrders();

            if (open_orders_binding_list.Count != 0)
            {
                current_open_order = (TblOrders)OrdersListBox.SelectedItem;
                OrderNrLabel.Text  = "#" + current_open_order.OrderID.ToString();
                UpdateCurrentOrderItems();
                BillingPanel.BringToFront();
                TablesButton.Show();
                OrdersButton.Show();
                TableLabel.Show();
                OrderNrLabel.Show();
                OrderNrLabel.BringToFront();
                show_billingPanel = true;
            }
            else
            {
                GuestCountPanel.BringToFront();
            }
        }
Ejemplo n.º 3
0
 private void OrdersListBox_Click(object sender, EventArgs e)
 {
     if (open_orders_binding_list.Count == 0)
     {
         return;
     }
     current_open_order = (TblOrders)OrdersListBox.SelectedItem;
     OrderNrLabel.Text  = "#" + current_open_order.OrderID.ToString();
     UpdateCurrentOrderItems();
 }