public Listado ( string Campos, string Condicion, string Orden ) : |
||
Campos | string | |
Condicion | string | |
Orden | string | |
return |
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 + " --");
}
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(); }