示例#1
0
        private void btnIngresar_Click_1(object sender, EventArgs e)
        {
            String user = txtUsuario.Text;
            String pass = Encripter.Crypt(txtPass.Text);
            String sql  = "SELECT * FROM usuario WHERE user = '******' AND passwd = '" + pass + "'";

            if (mysql.count(sql) == 0)
            {
                MessageBox.Show("Usuario y/o contraseña incorrecto.");
            }
            else
            {
                new Form2(this).Show();

                mysql.cerrar();
                this.Hide();
            }
        }