private void btn_AddAward_Click(object sender, EventArgs e) { var form = new AwardForm(); if (form.ShowDialog() == DialogResult.OK) { awardBL.Add(new Award(form.Title, form.Description)); DisplayAwards(); } }
private void AddAward() { var form = new AwardForm(); if (form.ShowDialog() == DialogResult.OK) { listOfAwards.Add(new Award(_awardId, form.AwardName, form.AwardDesc)); DisplayAwards(); } }
private void AddAward() { var form = new AwardForm(); if (form.ShowDialog() == DialogResult.OK) { listOfAwards.Add(new Award(_awardId++, form.AwardName, form.AwardDesc)); ctrGridAward.DataSource = null; ctrGridAward.DataSource = listOfAwards; } }
public ActionResult Create(FormCollection collection) { try { listOfAwards.Add(collection["AwardName"], collection["AwardDescription"]); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(Award award) { try { awards.Add(award); return(RedirectToAction("Index")); } catch { return(View()); } }