public ActionResult Edit(int id, FormCollection collection) { try { awards.Edit(new Award(int.Parse(collection["Id"]), collection["Title"], collection["Description"])); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Edit(int id, FormCollection collection) { try { awards.Edit(new Award(int.Parse(collection["Id"]), collection["Титул"], collection["Описание"])); return(RedirectToAction("Список")); } catch { return(View()); } }
private void EditSelectedAward() { if (ctlAwards.SelectedCells.Count > 0) { Award award = (Award)ctlAwards.SelectedCells[0].OwningRow.DataBoundItem; AwardForm form = new AwardForm(award); if (form.ShowDialog(this) == DialogResult.OK) { award.Title = form.Title; award.Description = form.Description; awards.Edit(award); DisplayAwards(); DisplayUsers(); } } }