private void data_sim_preview_SelectedIndexChanged(object sender, EventArgs e) { Simulacion.Cliente cliente = null; try { int selected = data_sim_preview.SelectedIndices[0]; cliente = sim.clientes[selected]; } catch { } if (cliente != null) { FormCliente dialog = new FormCliente(cliente); dialog.ShowDialog(); } }
public FormCliente(Simulacion.Cliente cliente) { this.cliente = cliente; InitializeComponent(); }