public ActionResult DeleteConfirmed(int id) { ServisniZasahPrvekSarze servisniZasahPrvekSarze = db.ServisniZasahPrvekSarze.Find(id); db.ServisniZasahPrvekSarze.Remove(servisniZasahPrvekSarze); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,ServisniZasahPrvekId,Sarze,SAPKod,Sklad,Mnozstvi")] ServisniZasahPrvekSarze servisniZasahPrvekSarze) { if (ModelState.IsValid) { db.Entry(servisniZasahPrvekSarze).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ServisniZasahPrvekId = new SelectList(db.ServisniZasahPrvek, "Id", "Id", servisniZasahPrvekSarze.ServisniZasahPrvekId); return(View(servisniZasahPrvekSarze)); }
// GET: Sarze/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ServisniZasahPrvekSarze servisniZasahPrvekSarze = db.ServisniZasahPrvekSarze.Find(id); if (servisniZasahPrvekSarze == null) { return(HttpNotFound()); } return(View(servisniZasahPrvekSarze)); }
// GET: Sarze/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ServisniZasahPrvekSarze servisniZasahPrvekSarze = db.ServisniZasahPrvekSarze.Find(id); if (servisniZasahPrvekSarze == null) { return(HttpNotFound()); } ViewBag.ServisniZasahPrvekId = new SelectList(db.ServisniZasahPrvek, "Id", "Id", servisniZasahPrvekSarze.ServisniZasahPrvekId); return(View(servisniZasahPrvekSarze)); }