private void btnMostrar_Click(object sender, EventArgs e) { int numFila; int iter = 0; bebidas = Bebida.darBebidas(); gridBebidas.Rows.Clear(); if (bebidas.Count == 0) { MessageBox.Show("No hay bebidas agregadas"); } foreach (Producto b in bebidas) { numFila = gridBebidas.Rows.Add(); iter++; gridBebidas.Rows[numFila].Cells[0].Value = iter; gridBebidas.Rows[numFila].Cells[1].Value = b.getIdBebida(); gridBebidas.Rows[numFila].Cells[2].Value = b.getNombre(); gridBebidas.Rows[numFila].Cells[3].Value = b.getPrecio(); gridBebidas.Rows[numFila].Cells[4].Value = b.getPresentacion(); gridBebidas.Rows[numFila].Cells[5].Value = b.getCantidad(); } }