Exemple #1
0
        private void Button5_Click(object sender, EventArgs e)
        {
            this.Hide();
            SECOND s = new SECOND();

            s.Show();
        }
Exemple #2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            string        connection = CommonMethods.GetConnectionString();
            SqlConnection con        = new SqlConnection(connection);

            SqlDataAdapter sda = new SqlDataAdapter("Select Count(*) from addinguser where password='******' and username ='******'", con);
            DataTable      dt  = new DataTable();

            sda.Fill(dt);
            if (textBox2.Text == "mayank" && textBox1.Text == "mayank123")
            {
                MessageBox.Show("ADMIN LOGIN SUCCESSFUL");
                this.Hide();
                ADMIN_LOGIN a = new ADMIN_LOGIN();
                a.Show();
            }
            else if (dt.Rows[0][0].ToString() == "1")
            {
                MessageBox.Show("LOGIN SUCCESSFUL");

                this.Hide();
                SECOND ss = new SECOND();
                ss.Show();
            }
            else
            {
                MessageBox.Show("INVALID USERNAME OR PASSWORD");
            }
        }