Пример #1
0
 private void NewItem(object sender, EventArgs e)
 {
     var newUser = new UserForm();
     var result = newUser.ShowDialog();
     if (result == System.Windows.Forms.DialogResult.OK)
     {
         RefreshItems(sender, e);
     }
 }
Пример #2
0
        private void UpdateItem(object sender, EventArgs e)
        {
            var user = dataGridView.SelectedRows[0].DataBoundItem as User;

            var newUser = new UserForm(user.Id);
            var result = newUser.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.OK)
            {
                RefreshItems(sender, e);
            }
        }