BLL.Ingresos.Listado C# (CSharp) Method

Listado() public method

public Listado ( string Campos, string Condicion, string Orden ) : DataTable
Campos string
Condicion string
Orden string
return System.Data.DataTable
        public override DataTable Listado(string Campos, string Condicion, string Orden)
        {
            ConexionDb Conexion = new ConexionDb();

            string OrdenFinal = " ";

            if (!Orden.Equals(""))
            {
                OrdenFinal = " Orden by " + Orden;
            }

            return Conexion.ObtenerDatos("select " + Campos + " from Ingresos where " + Condicion + " " + OrdenFinal);
        }
    }

Usage Example

        void LlenarGrid(string Condicion)
        {
            Ingresos Ingreso = new Ingresos();

            ConsultaGridView.DataSource = Ingreso.Listado(" * ", Condicion, "");
            ConsultaGridView.DataBind();
        }
All Usage Examples Of BLL.Ingresos::Listado