示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tblGradjanin tblGradjanin = db.tblGradjanins.Find(id);

            db.tblGradjanins.Remove(tblGradjanin);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 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));
 }
示例#3
0
        // 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));
        }
示例#4
0
        // 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));
        }