private void AddReward() { AddRewardForm form = new AddRewardForm(); if (form.ShowDialog(this) == DialogResult.OK) { Reward reward = new Reward(); reward.Title = form.Title; reward.Description = form.Description; logic.AddReward(reward); UpdateRewardsGrid(); } }
private void EditSelectedRewards() { if (ctlReward.SelectedCells.Count > 0) { Reward reward = (Reward)ctlReward.SelectedCells[0].OwningRow.DataBoundItem; AddRewardForm form = new AddRewardForm(reward); if (form.ShowDialog(this) == DialogResult.OK) { reward.Title = form.Title; reward.Description = form.Description; logic.UpdateReward(reward); } } UpdateUsersGrid(); UpdateRewardsGrid(); }