private void btnCreate_Click(object sender, EventArgs e) { var createForm = new UserProfileUpdate(); var result = createForm.ShowDialog(); if (result == DialogResult.OK) { _repository.Insert(createForm.Result); this._grid.Refresh(); } }
private void EditSelected() { if (this.SelectedItem != null) { var editForm = new UserProfileUpdate(this.SelectedItem); var result = editForm.ShowDialog(); if (result == DialogResult.OK) { _repository.Update(editForm.Result); this._grid.Refresh(); } } }