コード例 #1
0
 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();
     }
 }