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