private void btnBack_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmOperatorPanel frm = new frmOperatorPanel();

            frm.Show();
        }
Beispiel #2
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            frmOperatorPanel operatorPanel = new frmOperatorPanel();

            this.Hide();
            operatorPanel.Show();
        }
Beispiel #3
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 btnBack_Click(object sender, EventArgs e)
 {
     if (emp.getDesignation().Equals("Admin"))
     {
         this.Hide();
         frmAdminPanel adminPanel = new frmAdminPanel();
         adminPanel.Show();
     }
     else if (emp.getDesignation().Equals("Operator"))
     {
         this.Hide();
         frmOperatorPanel frm = new frmOperatorPanel();
         frm.Show();
     }
 }
        private void btnLogin_Click(object sender, EventArgs e)
        {
            Database db = new Database();

            if (db.loginOperator(txtEmail.Text, txtPassword.Text))
            {
                Employee         emp           = db.searchEmployee("" + db.getEmployeeID(txtEmail.Text, txtPassword.Text));
                frmOperatorPanel operatorPanel = new frmOperatorPanel(emp);
                this.Hide();
                operatorPanel.Show();
            }
            else
            {
                MessageBox.Show("Invalid Credentials! Please Try Again...");
            }
        }
        private void btnByCNIC_Click(object sender, EventArgs e)
        {
            Database db = new Database();

            if (db.removePassenger(txtPassengerCNIC.Text))
            {
                MessageBox.Show("Passenger Successfully removed!");
                this.Hide();
                frmOperatorPanel frm = new frmOperatorPanel(emp);
                frm.Show();
            }
            else
            {
                MessageBox.Show("Unable to remove Passenger!");
            }
        }
        private void btnDeleteTicket_Click(object sender, EventArgs e)
        {
            Database db = new Database();

            if (!txtTicketID.Equals(""))
            {
                if (db.deleteTicket(int.Parse(txtTicketID.Text)))
                {
                    MessageBox.Show("Route successfully deleted!");
                    this.Hide();
                    frmOperatorPanel frm = new frmOperatorPanel();
                    frm.Show();
                }
            }
            else
            {
                MessageBox.Show("Error! field is empty.");
            }
        }