private void EditSelectedAward() { if (ctlAwards.SelectedRows.Count > 0) { Awards award = (Awards)ctlAwards.SelectedCells[0].OwningRow.DataBoundItem; AwardForm form = new AwardForm(award); if (form.ShowDialog(this) == DialogResult.OK) { award.ID = form.ID; award.Title = form.Title; award.Description = form.Description; } } }
private void ctlFileInsertAward_Click(object sender, EventArgs e) { AwardForm NewAwardForm = new AwardForm(); if (NewAwardForm.ShowDialog(this) == DialogResult.OK) { awardService.CreateNewAward ( NewAwardForm.Title, NewAwardForm.Description ); } UpdateAwardDataGridView(); }
private void RegisterNewAward() { AwardForm form = new AwardForm(); if (form.ShowDialog(this) == DialogResult.OK) { Awards award = new Awards(); award.ID = form.ID; award.Title = form.Title; award.Description = form.Description; _awards.Add(award); } }