public ActionResult DeleteConfirmed(int id) { InfoBilet infoBilet = db.InfoBilets.Find(id); db.InfoBilets.Remove(infoBilet); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IDbilet,Korisnik,IDvraboten,Cena,Ime_film,Tehnologija,Datum,Vreme_pocnuvanje,Sala,Sediste,Red")] InfoBilet infoBilet) { if (ModelState.IsValid) { db.Entry(infoBilet).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(infoBilet)); }
// GET: InfoBilets/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } InfoBilet infoBilet = db.InfoBilets.Find(id); if (infoBilet == null) { return(HttpNotFound()); } return(View(infoBilet)); }