public ActionResult DeleteConfirmed(int id) { tNomer tNomer = db.tNomer.Find(id); db.tNomer.Remove(tNomer); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID_Nomer,Zanyat,Tip_nomera")] tNomer tNomer) { if (ModelState.IsValid) { db.Entry(tNomer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tNomer)); }
public ActionResult Create([Bind(Include = "ID_Nomer,Zanyat,Tip_nomera")] tNomer tNomer) { if (ModelState.IsValid) { db.tNomer.Add(tNomer); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tNomer)); }
// GET: tNomers/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tNomer tNomer = db.tNomer.Find(id); if (tNomer == null) { return(HttpNotFound()); } return(View(tNomer)); }