Esempio n. 1
0
 private void btnBack_Click(object sender, EventArgs e)
 {
     this.Close();
     parent.Show();
     parent.Left = this.Left;
     parent.Top  = this.Top;
 }
Esempio n. 2
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            frmMenuCustomer menu = new frmMenuCustomer();

            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;
            }
        }