Example #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            MenuGui gui = new MenuGui(cust);

            this.Hide();
            gui.ShowDialog();
            this.Close();
        }
Example #2
0
        private void button12_Click(object sender, EventArgs e)
        {
            Menu menu = new Menu(cust);

            menu.deposit(textBox1.Text);
            MessageBox.Show("Account Updated\nReturning to Menu");
            MenuGui gui = new MenuGui(cust);

            this.Hide();
            gui.ShowDialog();
            this.Close();
        }
Example #3
0
 private void enter_Click(object sender, EventArgs e)
 {
     foreach (Customer pin in customer)
     {
         if (string.Equals(pin.getPin(), textBox1.Text))
         {
             Menu    menu = new Menu(pin);//pass customer object that has matching pin to menu system
             MenuGui gui  = new MenuGui(pin);
             this.Hide();
             gui.ShowDialog();
             this.Close();
         }
     }
     MessageBox.Show("Invalid pin");
 }
Example #4
0
        private void button13_Click(object sender, EventArgs e)
        {
            Menu menu = new Menu(cust);

            if (menu.withdraw(textBox1.Text))
            {
                MessageBox.Show("Processing Complete\nPlease take your cash");
                MenuGui gui = new MenuGui(cust);
                this.Hide();
                gui.ShowDialog();
                this.Close();
            }
            else
            {
                MessageBox.Show("Not enough funds in account");
                textBox1.Text = null;
            }
        }