public ActionResult DeleteConfirmed(int id)
        {
            Nadanie nadanie = db.Nadanie.Find(id);

            db.Nadanie.Remove(nadanie);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,FK_Klient,Data")] Nadanie nadanie)
 {
     if (ModelState.IsValid)
     {
         db.Entry(nadanie).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FK_Klient = new SelectList(db.Klient, "ID", "ImieNazwisko", nadanie.FK_Klient);
     return(View(nadanie));
 }
        public ActionResult Create([Bind(Include = "ID,FK_Klient,Data")] Nadanie nadanie)
        {
            if (ModelState.IsValid)
            {
                db.Nadanie.Add(nadanie);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.FK_Klient = new SelectList(db.Klient, "ID", "ImieNazwisko", nadanie.FK_Klient);
            return(View(nadanie));
        }
        // GET: Nadanie/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Nadanie nadanie = db.Nadanie.Find(id);

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

            if (nadanie == null)
            {
                return(HttpNotFound());
            }
            ViewBag.FK_Klient = new SelectList(db.Klient, "ID", "ImieNazwisko", nadanie.FK_Klient);
            return(View(nadanie));
        }