Example #1
0
        private void btn_DeleteUser_Click(object sender, EventArgs e)
        {
            var user = dataGridView1.CurrentRow.DataBoundItem as User;

            var form = new DeleteUser();

            if (form.ShowDialog() == DialogResult.OK && (user != null))
            {
                userList.Remove(user);
            }
        }
        private void btn_DeleteUser_Click(object sender, EventArgs e)
        {
            var user = dgv_Users.CurrentRow.DataBoundItem as User;

            var form = new DeleteUser();

            if (form.ShowDialog() == DialogResult.OK && (user != null))
            {
                userBL.Delete(user);
                DisplayUsers();
            }
        }