public ActionResult DeleteConfirmed(int id) { tblGradjanin tblGradjanin = db.tblGradjanins.Find(id); db.tblGradjanins.Remove(tblGradjanin); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "GradjaninID,Tip,Ime,Prezime,JMBG,Pol,DatumIzdavanja,DatumRodjenja,MestoRodjenja,DrzavaRodjenja,Prebivaliste,KodDrzave,MaloletnoLice")] tblGradjanin tblGradjanin) { if (ModelState.IsValid) { db.Entry(tblGradjanin).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MaloletnoLice = new SelectList(db.tblMaloletnoLice, "MaloletnoLiceID", "UverenjeODrzavljanstvu", tblGradjanin.MaloletnoLice); return(View(tblGradjanin)); }
// GET: tblGradjanins/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tblGradjanin tblGradjanin = db.tblGradjanins.Find(id); if (tblGradjanin == null) { return(HttpNotFound()); } return(View(tblGradjanin)); }
// GET: tblGradjanins/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tblGradjanin tblGradjanin = db.tblGradjanins.Find(id); if (tblGradjanin == null) { return(HttpNotFound()); } ViewBag.MaloletnoLice = new SelectList(db.tblMaloletnoLice, "MaloletnoLiceID", "UverenjeODrzavljanstvu", tblGradjanin.MaloletnoLice); return(View(tblGradjanin)); }