private void BackButton_Click(object sender, EventArgs e)
        {
            AdminHomepage adminHomepage = new AdminHomepage();

            adminHomepage.Show();
            this.Hide();
        }
Beispiel #2
0
        private void button_Login_Click(object sender, EventArgs e)
        {
            bool success = false;

            if (textBox_Username.Text == "" || textBox_Password.Text == "")
            {
                MessageBox.Show("Fields can not be empty. Try again.");
            }
            else
            {
                TicketClass.user_id  = textBox_Username.Text;
                TicketClass.password = textBox_Password.Text;

                success = c.login_check_admin();
                if (success == true)
                {
                    AdminHomepage adminHomepage = new AdminHomepage();
                    adminHomepage.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Enter the correct credentials");
                }
            }
        }