示例#1
0
        /// <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();
        }
示例#2
0
        /// <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();
            }
        }
示例#3
0
        /// <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();
            }
        }
示例#4
0
        /// <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();
        }