public ActionResult DeleteConfirmed(decimal id) { OTEL otel = db.OTEL.Find(id); db.OTEL.Remove(otel); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Details(decimal id = 0) { OTEL otel = db.OTEL.Find(id); if (otel == null) { return(HttpNotFound()); } return(View(otel)); }
public ActionResult Edit(OTEL otel) { if (ModelState.IsValid) { db.Entry(otel).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ILID = new SelectList(db.IL, "ID", "ILADI", otel.ILID); return(View(otel)); }
public ActionResult Edit(decimal id = 0) { OTEL otel = db.OTEL.Find(id); if (otel == null) { return(HttpNotFound()); } ViewBag.ILID = new SelectList(db.IL, "ID", "ILADI", otel.ILID); return(View(otel)); }
public ActionResult Create(OTEL otel) { if (ModelState.IsValid) { db.OTEL.Add(otel); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ILID = new SelectList(db.IL, "ID", "ILADI", otel.ILID); return(View(otel)); }