public ActionResult DeleteConfirmed(int id)
        {
            Raporty raporty = db.Raporties.Find(id);

            db.Raporties.Remove(raporty);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "RaportyID,DataRaportu,Temat,Tresc,UzytkownicyID")] Raporty raporty)
 {
     if (ModelState.IsValid)
     {
         db.Entry(raporty).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UzytkownicyID = new SelectList(db.Uzytkownicies, "UzytkownicyID", "Imie", raporty.UzytkownicyID);
     return(View(raporty));
 }
        // GET: Raporty/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Raporty raporty = db.Raporties.Find(id);

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

            if (raporty == null)
            {
                return(HttpNotFound());
            }
            ViewBag.UzytkownicyID = new SelectList(db.Uzytkownicies, "UzytkownicyID", "Imie", raporty.UzytkownicyID);
            return(View(raporty));
        }