BLL.Presupuesto.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 = " Order by " + Orden;
            }
            return conexion.ObtenerDatos("select " + Campos + " from Presupuestos where " + Condicion + " " + OrdenFinal + " --");
        }

Usage Example

        protected void Page_Load(object sender, EventArgs e)
        {
            Presupuesto presupuesto = new Presupuesto();
            ListadoPresupuestoViewer.ProcessingMode = ProcessingMode.Local;
            ListadoPresupuestoViewer.LocalReport.ReportPath = Server.MapPath("~/Rpts/ListadoPresupuesto.rdlc");            
            ListadoPresupuestoViewer.LocalReport.DataSources.Clear();
            ListadoPresupuestoViewer.LocalReport.DataSources.Add(new ReportDataSource("Presupuestos", presupuesto.Listado("*", "1=1", "")));           
            ListadoPresupuestoViewer.LocalReport.Refresh();

        }
All Usage Examples Of BLL.Presupuesto::Listado