예제 #1
0
        private void CreateReward()
        {
            var formReward = new FormReward();

            if (formReward.ShowDialog(this) == DialogResult.OK)
            {
                _rewardsBL.Add(new Reward(formReward.Title, formReward.Description));
            }
        }
예제 #2
0
        private void EditReward()
        {
            if (dgvRewards.SelectedCells.Count > 0)
            {
                Reward reward = (Reward)dgvRewards.SelectedCells[0].OwningRow.DataBoundItem;

                var formReward = new FormReward(reward);

                if (formReward.ShowDialog(this) == DialogResult.OK)
                {
                    reward.Title       = formReward.Title;
                    reward.Description = formReward.Description;
                }
            }
        }