public ClientAddForm(CartForm cf) { parent = cf; InitializeComponent(); var _selectedClients = db.ClientOfParks.Select(c => c.Name) .ToList(); clientNameCB.DataSource = _selectedClients; // clientNameCB.SelectedIndex = -1; }
private void button5_Click(object sender, EventArgs e) { var cart = new CartForm(this); cart.ShowDialog(this); }