Пример #1
0
        private void button18_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            menu obj = new menu();

            obj.Visible = true;
        }
Пример #2
0
        private void button7_Click(object sender, EventArgs e)
        {
            String nam, pas;

            nam = textBox1.Text;
            pas = textBox2.Text;
            OleDbCommand cmd = new OleDbCommand("select * from signup where Username='******' and Password='******'", con);

            con.Open();
            OleDbDataReader dr = cmd.ExecuteReader();

            if (dr.Read())
            {
                this.Visible = false;
                menu obj = new menu();
                obj.Visible = true;
            }
            else
            {
                label2.Visible = true;
                label2.Text    = "Username and password not valid";
            }
            con.Close();
        }