private void button6_Click(object sender, EventArgs e)
        {
            AdminMainPanel a = new AdminMainPanel();

            this.Hide();
            a.Show();
        }
        private void btnGoToTheMainAdminPanel_Click(object sender, EventArgs e)
        {
            AdminMainPanel a = new AdminMainPanel();

            this.Hide();
            a.Show();
        }
Ejemplo n.º 3
0
        private void btnForLogIn_Click(object sender, EventArgs e)
        {
            SqlConnection  con   = new SqlConnection("Data Source=DESKTOP-IQPR1LD\\ASHIFULSQL;Initial Catalog=registrationForm;Integrated Security=True");
            string         query = "select * from tblUser where UserName='******'and Password='******'";
            SqlDataAdapter ad    = new SqlDataAdapter(query, con);
            DataTable      dt    = new DataTable();

            ad.Fill(dt);
            if (dt.Rows.Count == 1)
            {
                AdminMainPanel a = new AdminMainPanel();
                this.Hide();
                a.Show();
            }
            else
            {
                MessageBox.Show("Check your username and password");
            }
        }