protected void ddlUsuario_SelectedIndexChanged(object sender, EventArgs e) { int AuctionId = (int)ViewState["AuctionID"]; SubastaBLL bl = new SubastaBLL(); int opcion = Convert.ToInt32(ddlUsuario.SelectedValue); if (opcion == 0) { List<AuctionRecord> lstRecord = new List<AuctionRecord>(); lstRecord = bl.cargarAuctionrecord(AuctionId); ViewState["lstRecord"] = lstRecord; grdHistorial.DataSource = lstRecord; grdHistorial.DataBind(); suma(); } else { opcion = Convert.ToInt32(ddlUsuario.SelectedValue); List<AuctionRecord> lstRecord = new List<AuctionRecord>(); lstRecord = bl.CargarDDLGRID(AuctionId, opcion); ViewState["lstRecord"] = lstRecord; grdHistorial.DataSource = lstRecord; grdHistorial.DataBind(); suma(); } }
public void cargarHistorial(int AuctionID) { SubastaBLL bl = new SubastaBLL(); Auction subasta = new Auction(); subasta = bl.cargarSubastaHistorial(AuctionID); txtProducto.Text = subasta.ProductName; txtDescripcion.Text = subasta.Description; List<AuctionRecord> lstRecord = new List<AuctionRecord>(); lstRecord = bl.cargarAuctionrecord(AuctionID); ViewState["lstRecord"] = lstRecord; grdHistorial.DataSource = lstRecord; grdHistorial.DataBind(); ScriptManager.RegisterStartupScript(this, typeof(Page), "calculateTotal", "calculateTotal()", true); }