public ActionResult Edit(int?id) { ogla oglasi = db.oglas.Find(id); if (oglasi == null) { return(HttpNotFound()); } return(View(oglasi)); }
public ActionResult Edit([Bind(Include = "OglasID,start,cilj,cas,strosek,opis,st_oseb")] ogla oglasi) { if (ModelState.IsValid) { db.Entry(oglasi).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(oglasi)); }
public ActionResult Create(ogla oglasi) { if (ModelState.IsValid) { db.oglas.Add(oglasi); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(oglasi)); }