private void btnBack_Click(object sender, EventArgs e)
        {
            frmMenuAdmin parent = new frmMenuAdmin();

            this.Hide();
            parent.Show();
            parent.Left = this.Left;
            parent.Top  = this.Top;
        }
        private void btnBack_Click_1(object sender, EventArgs e)
        {
            frmMenuAdmin menu = new frmMenuAdmin();

            menu.Show();
            menu.Left = this.Left;
            menu.Top  = this.Top;
            this.Close();
        }
Esempio n. 3
0
        //Log In and Validation
        private void btnLogIn_Click_1(object sender, EventArgs e)
        {
            if (txtEmail.Text == "" || txtPassword.Text == "")
            {
                MessageBox.Show("Please enter username and password");

                return;
            }

            if (txtEmail.Text == "admin" && txtPassword.Text == "admin")
            {
                btnLogIn.Enabled = false;
                admin            = true;
                this.Close();
                frmMenuAdmin nextForm = new frmMenuAdmin();
                nextForm.Show();
                nextForm.Left = this.Left;
                nextForm.Top  = this.Top;
            }
            else if (Customer.checkEmail(txtEmail.Text))
            {
                if (Customer.checkPass(txtPassword.Text, txtEmail.Text))
                {
                    btnLogIn.Enabled = false;

                    CustomerID = Customer.getCustIDFromEmail(txtEmail.Text);

                    admin = false;
                    this.Close();

                    frmMenuCustomer nextForm = new frmMenuCustomer();

                    nextForm.Show();

                    nextForm.Left = this.Left;
                    nextForm.Top  = this.Top;
                }
                else
                {
                    MessageBox.Show("Password is incorrect");
                    return;
                }
            }
            else
            {
                MessageBox.Show("Email does not exist, please sign up!");
                return;
            }
        }
Esempio n. 4
0
 public frmBookingsMyAdmin(frmMenuAdmin Parent)
 {
     InitializeComponent();
     parent = Parent;
 }