Пример #1
0
        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();
            }
        }
Пример #2
0
        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();
                }
            }
        }