/// <summary> /// returns to tableoverview without saving /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Back_Click(object sender, EventArgs e) { TableOverview tableOverview = new TableOverview(Employee); this.Hide(); tableOverview.ShowDialog(); this.Close(); }
/// <summary> /// finishes order, returns to tableoverview /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Submit_Click(object sender, EventArgs e) { DialogResult dr = MessageBox.Show("Wil je de order doorgeven naar de keuken?", "Order bevestigen", MessageBoxButtons.YesNo); if (dr == DialogResult.Yes) { SendOrder(); TableOverview tableOverview = new TableOverview(Employee); this.Hide(); tableOverview.ShowDialog(); this.Close(); } }
/// <summary> /// closes order, returns to tableoverview /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_Pay_Click(object sender, EventArgs e) { DialogResult dr = MessageBox.Show("Do you want to finish the order?", "Confirm finishing order", MessageBoxButtons.YesNo); if (dr == DialogResult.Yes) { orderService.UpdateStatus("closed", Table.OrderId); tableService.UpdateTableStatus(Table.TableNumber, "free"); orderProductService.UpdateOrderProductStatusByOrderId(Table.OrderId, Statustype.Afgehandeld); TableOverview tableOverview = new TableOverview(Employee); this.Hide(); tableOverview.ShowDialog(); this.Close(); } }
/// <summary> /// This method opens the right form for the right employee. /// </summary> private void OpenForm() { this.Hide(); switch (employee.TypeWorker) { case "server": TableOverview tableOverview = new TableOverview(employee); tableOverview.ShowDialog(); break; case "cook": KitchenOverview kitchenOverview = new KitchenOverview(employee); kitchenOverview.ShowDialog(); break; case "bar": KitchenOverview barOverview = new KitchenOverview(employee); barOverview.ShowDialog(); break; } this.Close(); }