private void clientsComboBoxEx_SelectedIndexChanged(object sender, EventArgs e) { if (clientsComboBoxEx.SelectedIndex == -1) { editClientButton.Enabled = false; foreach (TextBox tb in groupBox1.Controls.OfType()) { if (tb.Text != "") { tb.ResetText(); } } } if (clientsComboBoxEx.SelectedIndex == 0) { editClientButton.Enabled = false; cb = clientsComboBoxEx; NewClient newclientform = new NewClient(cb); newclientform.ShowDialog(); clientsComboBoxEx.SelectedIndex = -1; } if (clientsComboBoxEx.SelectedIndex >0) { editClientButton.Enabled = true; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)