Example #1
0
        private void backButton_Click(object sender, EventArgs e)
        {
            Admin_Module am = new Admin_Module();

            am.Show();
            this.Hide();
        }
Example #2
0
        private void backButton_Click(object sender, EventArgs e)
        {
            // Open the new admin module form
            Admin_Module am = new Admin_Module();

            am.Show();
            this.Hide();
        }
        // login buttton functinality
        private void enterButton_Click(object sender, EventArgs e)
        {
            con.Open();
            SqlDataAdapter sda = new SqlDataAdapter("SELECT COUNT(*) from trainAdmin where adminID='" + adminIdBox.Text + "' and adminPassword='******'", con);
            DataTable      dt  = new DataTable();

            sda.Fill(dt);
            if (dt.Rows[0][0].ToString() == "1")
            {
                MessageBox.Show("Login Successfully ");
                Admin_Module am = new Admin_Module();
                am.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Your Admin ID or Password is incorrect !..");
            }

            con.Close();
        }