Пример #1
0
 private void ShowEditForm()
 {
     if (gridViewUser.GetFocusedRow() is UserBl selected)
     {
         var form = new EditUserForm(_repo, selected);
         form.ShowDialog();
         form.Dispose();
     }
 }
Пример #2
0
        private void barButtonItemAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var form = new EditUserForm(_repo);

            if (form.ShowDialog() == DialogResult.OK)
            {
                RefreshGrid();
                form.Dispose();
                gridViewUser.FocusedRowHandle = _items.Count - 1;
            }
        }