예제 #1
0
        private void RemoveReward()
        {
            if (dgvRewards.Rows.Count > 0)
            {
                var formSureRemove = new FormSureRemove(_QuestionWhenDeletingAnReward);

                if (formSureRemove.ShowDialog(this) == DialogResult.OK)
                {
                    Reward reward = (Reward)dgvRewards.SelectedCells[0].OwningRow.DataBoundItem;

                    _rewardsBL.Remove(reward);
                }
            }
        }
예제 #2
0
        private void RemoveUser()
        {
            if (dgvUsers.Rows.Count > 0)
            {
                var formSureRemove = new FormSureRemove(_QuestionWhenDeletingAnUser);

                if (formSureRemove.ShowDialog(this) == DialogResult.OK)
                {
                    User user = (User)dgvUsers.SelectedCells[0].OwningRow.DataBoundItem;

                    _usersBL.Remove(user);
                }
            }
        }