Ejemplo n.º 1
0
        private void CreateReward()
        {
            var formCreationReward = new FormCreationReward();

            formCreationReward.ShowDialog(this);

            if (formCreationReward.DialogResult == DialogResult.OK)
            {
                _rewards.Add(new Reward(formCreationReward.NameReward, formCreationReward.Description));
            }
        }
Ejemplo n.º 2
0
        private void EditReward()
        {
            if (ctlRewards.SelectedCells.Count > 0)
            {
                Reward reward = (Reward)ctlRewards.SelectedCells[0].OwningRow.DataBoundItem;

                var formEditingReward = new FormCreationReward(reward);

                formEditingReward.ShowDialog(this);

                if (formEditingReward.DialogResult == DialogResult.OK)
                {
                    reward.Title       = formEditingReward.NameReward;
                    reward.Description = formEditingReward.Description;

                    ctlRewards.Refresh();
                }
            }
        }