protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string codVenta = Request.QueryString["ven"]; N_PlataformaXProducto negPxP = new N_PlataformaXProducto(); N_Producto negP = new N_Producto(); N_Plataforma negPlat = new N_Plataforma(); N_DetalleVenta negDV = new N_DetalleVenta(); DataTable tabla = negPxP.getImagenDetalleVenta(codVenta); DataTable nombre = negP.getNombreProductoDetalleVenta(codVenta); DataTable plat = negPlat.getPlataformaDetalleVenta(codVenta); DataTable cp = negDV.getCantPrecioDetalleVenta(codVenta); tabla.Columns.Add("Nombre", typeof(string)); tabla.Columns.Add("Plataforma", typeof(string)); tabla.Columns.Add("Cantidad", typeof(int)); tabla.Columns.Add("PrecioTotal", typeof(int)); for (int i = 0; i < tabla.Rows.Count; i++) { tabla.Rows[i]["Nombre"] = nombre.Rows[i]["Nombre_Producto_PR"]; tabla.Rows[i]["Plataforma"] = plat.Rows[i]["Nombre_Plataforma_P"]; tabla.Rows[i]["Cantidad"] = cp.Rows[i]["Cantidad_Producto_DV"]; tabla.Rows[i]["PrecioTotal"] = cp.Rows[i]["PrecioTotal"]; } grdDetalle.DataSource = tabla; grdDetalle.DataBind(); } }