public ActionResult DeleteConfirmed(int id)
        {
            Faktura1 faktura1 = db.Faktura1.Find(id);

            db.Faktura1.Remove(faktura1);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,BrojFakture,DatumKreiranja,DatumDospijeca,Korisnik")] Faktura1 faktura1)
 {
     if (ModelState.IsValid)
     {
         db.Entry(faktura1).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Korisnik = new SelectList(db.Korisniks, "Id", "Ime", faktura1.Korisnik);
     return(View(faktura1));
 }
        // GET: Faktura1/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Faktura1 faktura1 = db.Faktura1.Find(id);

            if (faktura1 == null)
            {
                return(HttpNotFound());
            }
            return(View(faktura1));
        }
        // GET: Faktura1/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Faktura1 faktura1 = db.Faktura1.Find(id);

            if (faktura1 == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Korisnik = new SelectList(db.Korisniks, "Id", "Ime", faktura1.Korisnik);
            return(View(faktura1));
        }