public ActionResult DeleteConfirmed(int id) { CentraLogistyczne centraLogistyczne = db.CentraLogistyczne.Find(id); db.CentraLogistyczne.Remove(centraLogistyczne); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,Kod,Miasto,Ulica,Numer,KodPocztowy")] CentraLogistyczne centraLogistyczne) { if (ModelState.IsValid) { db.Entry(centraLogistyczne).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(centraLogistyczne)); }
public ActionResult Create([Bind(Include = "ID,Kod,Miasto,Ulica,Numer,KodPocztowy")] CentraLogistyczne centraLogistyczne) { if (ModelState.IsValid) { db.CentraLogistyczne.Add(centraLogistyczne); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(centraLogistyczne)); }
// GET: CentraLogistyczne/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CentraLogistyczne centraLogistyczne = db.CentraLogistyczne.Find(id); if (centraLogistyczne == null) { return(HttpNotFound()); } return(View(centraLogistyczne)); }