private void btnAddRewards_Click(object sender, EventArgs e) { FormAddRewards addRewards = new FormAddRewards(); addRewards.Owner = this; addRewards.btnSaveAdd.Visible = true; addRewards.btnExit.Visible = true; addRewards.btnAhead.Visible = false; addRewards.btnBack.Visible = false; addRewards.btnSaveChanges.Visible = false; addRewards.btnDelete.Visible = false; addRewards.Show(); }
private void btnEditRewards_Click(object sender, EventArgs e) { FormAddRewards formAddRewards = new FormAddRewards(); formAddRewards.Owner = this; formAddRewards.btnSaveAdd.Visible = false; formAddRewards.btnExit.Visible = false; formAddRewards.btnAhead.Visible = true; formAddRewards.btnBack.Visible = true; formAddRewards.btnSaveChanges.Visible = true; formAddRewards.btnDelete.Visible = true; Program.rewardsBL.indexOfReward = 0; formAddRewards.tbTitle.Text = Program.rewardsBL.GetList().ToList()[Program.rewardsBL.indexOfReward].Title; formAddRewards.tbDescription.Text = Program.rewardsBL.GetList().ToList()[Program.rewardsBL.indexOfReward].Description; formAddRewards.Show(); }