// GET: Kids/Edit/5 public ActionResult Edit(int id) { Kid kid = service.GetById(id); if (kid == null) { return(HttpNotFound()); } ViewBag.FundRaiserID = new SelectList(db.Fundraisers, "FundRaiserID", "Email", kid.FundRaiserID); return(View(kid)); }
public ActionResult DeleteKid(int id) { Kid c = ks.GetById(id); ks.Delete(c); ks.Commit(); return(RedirectToAction("Profil")); }
// GET: Wishes/Create/kidId public ActionResult Create(int id) { int kidId = id; //display the firstname in the view string KidFirstName = KidService. GetById(kidId). KidFistName; //initialise the wish with the kid id Wish wish = new Wish { KidID = kidId }; ViewBag.KidFirstName = KidFirstName; return(View(wish)); }