private void AddNewClient_Click(object sender, EventArgs e) { var newItemForm = new frmNewClient(); newItemForm.ShowDialog(); RefreshDGVSource(); }
private void EditRow_Click(object sender, EventArgs e) { if (DGVClients.SelectedRows.Count == 1) { var clientForEdit = (Client)DGVClients.SelectedRows[0].DataBoundItem; frmNewClient editClient = new frmNewClient(clientForEdit); editClient.ShowDialog(); DGVClients.DataSource = new BindingList <Client>(_clientLogic.GetClientByName(tbSearchName.Text)); DGVClients.ClearSelection(); } }