private void btnGoBack_Click(object sender, EventArgs e)
        {
            frmGMPanel frm = new frmGMPanel(emp);

            this.Hide();
            frm.Show();
        }
Exemple #2
0
        private void btnGoBack_Click(object sender, EventArgs e)
        {
            this.Hide();

            if (emp.getDesignation().Equals("Admin"))
            {
                frmAdminPanel frm = new frmAdminPanel(emp);
                frm.Show();
            }
            else if (emp.getDesignation().Equals("Manager"))
            {
                frmGMPanel frm = new frmGMPanel(emp);
                frm.Show();
            }
            else if (emp.getDesignation().Equals("Operator"))
            {
                frmOperatorPanel frm = new frmOperatorPanel(emp);
                frm.Show();
            }
            else
            {
                frmMainPanel frm = new frmMainPanel();
                this.Hide();
                frm.Show();
            }
        }
        private void btnLogin_Click(object sender, EventArgs e)
        {
            Database db = new Database();

            if (db.loginManager(txtEmail.Text, txtPassword.Text))
            {
                Employee   emp     = db.searchEmployee("" + db.getEmployeeID(txtEmail.Text, txtPassword.Text));
                frmGMPanel gmPanel = new frmGMPanel(emp);
                this.Hide();
                gmPanel.Show();
            }
            else
            {
                MessageBox.Show("Invalid Credentials! Please Try Again...");
            }
        }