Ejemplo n.º 1
0
        // Call when return to CustomerEntry when order is complete or cancelled
        private void ReturnToEntryForm()
        {
            var form = new CustomerEnter(order.ByTerminal);

            this.Dispose();
            form.ShowDialog();
        }
Ejemplo n.º 2
0
        private void button000_click(object sender, EventArgs e)
        {
            // Skapa ny random terminal
            Random rnd        = new Random();
            int    terminalID = rnd.Next(1, 50);
            var    Form0      = new CustomerEnter(terminalID);

            Form0.Text += $" {terminalID}";
            Form0.ShowDialog();
        }
Ejemplo n.º 3
0
        private void SwitchForm(int selected)
        {
            this.Hide();

            if (selected == 0)
            {
                var form = new Admin(user);
                form.ShowDialog();
            }
            else if (selected == 1)
            {
                var form = new Cashier(user);
                form.ShowDialog();
            }
            else if (selected == 2)
            {
                var form = new Baker(user);
                form.ShowDialog();
            }
            else if (selected == 3)
            {
                var form = new InfoScreen();
                form.ShowDialog();
            }
            else if (selected >= 4 && selected < 6)
            {
                var form = new CustomerEnter(selected - 3);
                form.ShowDialog();
                form.Text += $" {selected - 3}";
            }
            else
            {
                ShowErrorMessage("Inte implementerat");
                this.Show();
            }
        }