Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            int x = Int32.Parse(textBox1.Text);

            if (x >= 100 && x < 200 && textBox2.Text == "chef")
            {
                Chef obj1 = new Chef(x);
                obj1.Show();
            }
            else if (x >= 200 && x < 300 && textBox2.Text == "waiter")
            {
                Waiter obj2 = new Waiter(x);
                obj2.Show();
            }
            else if (x >= 300 && x < 400 && textBox2.Text == "cashier")
            {
                Cashier obj3 = new Cashier(x);
                obj3.Show();
            }
            else
            {
                MessageBox.Show("Invalid Username  or password");
                textBox1.Clear();
                textBox2.Clear();
                LogIn l = new LogIn();
                l.Show();
            }
        }
Esempio n. 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (eid == 200)
     {
         Waiter w = new Waiter(eid);
         this.Close();
         w.Show();
     }
     else if (eid == 300)
     {
         Cashier c = new Cashier(eid);
         this.Close();
         c.Show();
     }
     else if (eid == 100)
     {
         Chef ch = new Chef(eid);
         this.Close();
         ch.Show();
     }
 }