public static DbDataReader ObtenerDbDataReaderPorProcedure(SqlCommand cmd) { try { DbDataReader dr; comando = cmd; comando.Connection = AccesoBD.AbrirConexion(); comando.CommandType = CommandType.StoredProcedure; comando.CommandTimeout = 1024; dr = cmd.ExecuteReader(); return(dr); } catch (Exception ex) { throw ex; } }
public static DbDataReader ObtenerDatosDbDataAdapter(SqlCommand cmd) { try { DbDataReader dr; comando = cmd; comando.Connection = AccesoBD.AbrirConexion(); comando.CommandType = CommandType.Text; comando.CommandTimeout = 1024; dr = cmd.ExecuteReader(); return(dr); } catch (Exception ex) { throw ex; } }