private void RemoveSelectedAward() { if (ctlUsers.SelectedCells.Count > 0) { Award award = (Award)ctlAwards.SelectedCells[0].OwningRow.DataBoundItem; awards.Remove(award); awards.Remove(award, users); DisplayAwards(); } }
// // GET: /Award/Delete/5 public ActionResult Delete(int id) { var currentAward = awards.GetList().FirstOrDefault(u => u.Id == id); if (currentAward != null) { awards.Remove(currentAward); } return(RedirectToAction("Index")); }