Example #1
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            var createForm = new AreaUpdate();
            var result = createForm.ShowDialog();

            if (result == DialogResult.OK)
            {
                _repository.Insert(createForm.Result);
                this._grid.Refresh();
            }
        }
Example #2
0
        private void EditSelected()
        {
            if (this.SelectedItem != null)
            {
                var editForm = new AreaUpdate(this.SelectedItem);
                var result = editForm.ShowDialog();

                if (result == DialogResult.OK)
                {
                    _repository.Update(editForm.Result);
                    this._grid.Refresh();
                }
            }
        }