public ActionResult DeleteConfirmed(int id) { Program_Ishrane program_Ishrane = db.Program_Ishrane.Find(id); db.Program_Ishrane.Remove(program_Ishrane); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ProgramIshraneId,CenaPrograma,OpisPrograma,KlijentId")] Program_Ishrane program_Ishrane) { if (ModelState.IsValid) { db.Entry(program_Ishrane).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.KlijentId = new SelectList(db.Klijent, "KlijentId", "Ime", program_Ishrane.KlijentId); return(View(program_Ishrane)); }
public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Program_Ishrane program_Ishrane = db.Program_Ishrane.Find(id); if (program_Ishrane == null) { return(HttpNotFound()); } return(View(program_Ishrane)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Program_Ishrane program_Ishrane = db.Program_Ishrane.Find(id); if (program_Ishrane == null) { return(HttpNotFound()); } ViewBag.KlijentId = new SelectList(db.Klijent, "KlijentId", "Ime", program_Ishrane.KlijentId); return(View(program_Ishrane)); }