private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { comboBox2.Items.Clear(); Pis = Datos.ObtenerPInteres(comboBox1.SelectedIndex + 1, Pi[selected].Tabla); if (Pis != null) { foreach (PostgresDataAccess.PInteres pi in Pis) { comboBox2.Items.Add(pi.Nombre); } } }