private void btnEdit_Click(object sender, EventArgs e) { if (_clientService.GetAll().Count > 0) { ClientViewModel clientViewModel = (ClientViewModel)usersGridView.CurrentRow.DataBoundItem; Client client = _clientService.Get(clientViewModel.ClientId); AddEditUserForm addUserForm = new AddEditUserForm(_clientService, _bindingSource, client); addUserForm.Show(); } }
private void btnAddClient_Click(object sender, EventArgs e) { AddEditUserForm addUserForm = new AddEditUserForm(_clientService, _bindingSource); addUserForm.Show(); }