Ejemplo n.º 1
0
        private void btnAdd_Click(object sender, System.EventArgs e)
        {
            var form = new AddUserForm();

            if (form.ShowDialog() != DialogResult.Ignore)
            {
                LoadGrid();
            }
        }
Ejemplo n.º 2
0
        private void btnEdit_Click(object sender, System.EventArgs e)
        {
            if (gridUsers.SelectedRows.Count == 0)
            {
                return;
            }

            var user = gridUsers.SelectedRows[0].Tag as User;

            if (user == null)
            {
                return;
            }

            var form = new AddUserForm(user);

            if (form.ShowDialog() != DialogResult.Ignore)
            {
                LoadGrid();
            }
        }