executeReader() public method

public executeReader ( String SQL ) : System.Data.SqlClient.SqlDataReader
SQL String
return System.Data.SqlClient.SqlDataReader
コード例 #1
0
ファイル: pUsuarios.cs プロジェクト: gabrielfn97/projetolenda
        public void logar(String usuario, String senha)
        {
            String SQL = "SELECT * FROM dbo.CadLogin WHERE usuario = '" + usuario + "'  AND senha= '" + senha + "'";
            Conexao oConexao = new Conexao("SQLServer");

            SqlDataReader dr = oConexao.executeReader(SQL);

            while (dr.Read())
            {
                this.idCadLogin = Convert.ToString(dr["idCadLogin"]);
            }
            dr.Close();

            oConexao.fechaConexao();
        }
コード例 #2
0
        public void logar(String usuario, String senha)
        {
            String  SQL      = "SELECT * FROM dbo.CadLogin WHERE usuario = '" + usuario + "'  AND senha= '" + senha + "'";
            Conexao oConexao = new Conexao("SQLServer");

            SqlDataReader dr = oConexao.executeReader(SQL);

            while (dr.Read())
            {
                this.idCadLogin = Convert.ToString(dr["idCadLogin"]);
            }
            dr.Close();

            oConexao.fechaConexao();
        }
コード例 #3
0
        public void logar(String nomeUsuario, String senha)
        {
            String SQL = "SELECT * FROM Usuarios WHERE nome = '" + nomeUsuario + "' AND senha= '" + senha + "'";

            Conexao oConexao = new Conexao("SQLServer");

            SqlDataReader dr = oConexao.executeReader(SQL);

            while (dr.Read())
            {
                this.idUsuario = Convert.ToString(dr["idUSuario"]);
            }
            dr.Close();

            oConexao.fechaConexao();
        }
コード例 #4
0
        public void logar(String nomeUsuario, String senha)
        {
            String SQL = "SELECT * FROM Usuarios WHERE nome = '" + nomeUsuario + "' AND senha= '" + senha + "'";

            Conexao oConexao = new Conexao("SQLServer");

            SqlDataReader dr = oConexao.executeReader(SQL);

            while (dr.Read())
            {
                this.idUsuario = Convert.ToString(dr["idUSuario"]);
            }
            dr.Close();

            oConexao.fechaConexao();
        }
コード例 #5
0
        public void RecSenha(String idCadLogin, String email, String usuario, String senha)
        {
            String SQL = "SELECT idCadLogin, email, usuario, senha FROM dbo.CadLogin WHERE email = '" + email + "'  AND usuario= '" + usuario + "' UPDATE dbo.CadLogin";

            SQL += " SET senha = " + senha;
            Conexao oConexao = new Conexao("SQLServer");

            SqlDataReader dr = oConexao.executeReader(SQL);

            while (dr.Read())
            {
                this.idCadLogin = Convert.ToString(dr["idCadLogin"]);
            }
            dr.Close();

            oConexao.fechaConexao();
        }
コード例 #6
0
        public void verificarEmail(String email)
        {
            String SQL = "SELECT * FROM Usuarios WHERE email = '" + email + "'";

            Conexao oConexao = new Conexao("SQLServer");

            SqlDataReader dr = oConexao.executeReader(SQL);

            while (dr.Read())
            {
                this.idUsuario = Convert.ToString(dr["idUSuario"]);
                this.email     = Convert.ToString(dr["email"]);
                this.senha     = Convert.ToString(dr["senha"]);
            }
            dr.Close();

            oConexao.fechaConexao();
        }
コード例 #7
0
ファイル: pUsuarios.cs プロジェクト: gabrielfn97/projetolenda
        public void RecSenha(String idCadLogin, String email, String usuario, String senha)
        {
            String SQL = "SELECT idCadLogin, email, usuario, senha FROM dbo.CadLogin WHERE email = '" + email + "'  AND usuario= '" + usuario + "' UPDATE dbo.CadLogin";
            SQL += " SET senha = " + senha;
            Conexao oConexao = new Conexao("SQLServer");

            SqlDataReader dr = oConexao.executeReader(SQL);

            while (dr.Read())
            {
                this.idCadLogin = Convert.ToString(dr["idCadLogin"]);
            }
            dr.Close();

            oConexao.fechaConexao();
        }
コード例 #8
0
        public void verificarEmail(String email)
        {
            String SQL = "SELECT * FROM Usuarios WHERE email = '" + email + "'";

            Conexao oConexao = new Conexao("SQLServer");

            SqlDataReader dr = oConexao.executeReader(SQL);

            while (dr.Read())
            {
                this.idUsuario = Convert.ToString(dr["idUSuario"]);
                this.email = Convert.ToString(dr["email"]);
                this.senha = Convert.ToString(dr["senha"]);
            }
            dr.Close();

            oConexao.fechaConexao();
        }