public TablesDisplayControl() { InitializeComponent(); activeTables = new List <int>(); ConnectionObject.UpdateActiveTables(updateTablesFunc); updateTablesFunc(ConnectionObject.GetActiveTables()); }
private void OrderDrinkBtn_Click(object sender, EventArgs e) { if (listBox2.SelectedIndex == -1) { //No order was selected } else { Order newOrder = new Order(listBox1.GetItemText(listBox2.SelectedItem), tableID, 16.99, Order.ORDER_TYPE.BAR); ConnectionObject.SendOrder(tableID, newOrder); } }
private void showOpenTablePopup(int tableID) { if (activeTables.Any(x => x == tableID)) { mainForm.ShowNewOrderMenu(tableID); } else { OpenTablePopupForm popup = new OpenTablePopupForm(); DialogResult dialogresult = popup.ShowDialog(); if (dialogresult == DialogResult.OK) { ConnectionObject.OpenTable(tableID); mainForm.ShowNewOrderMenu(tableID); } popup.Dispose(); } }
public OrdersReadyControl() { InitializeComponent(); ordersReady = new List <Order>(); ConnectionObject.GetOrderReady(updateOrders); }