Example #1
0
        public ActionResult PotwierdzenieUsunieciaSe(int id)
        {
            SEASONS sEASONS = db.SEASONS.Find(id);

            db.SEASONS.Remove(sEASONS);
            db.SaveChanges();
            return(RedirectToAction("Sezony"));
        }
Example #2
0
 public ActionResult Edytuj_sezon([Bind(Include = "Season_ID,Year")] SEASONS sEASONS)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sEASONS).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Sezony"));
     }
     return(View(sEASONS));
 }
Example #3
0
        public ActionResult Stworz_sezon([Bind(Include = "Season_ID,Year")] SEASONS sEASONS)
        {
            if (ModelState.IsValid)
            {
                db.SEASONS.Add(sEASONS);
                db.SaveChanges();
                return(RedirectToAction("Sezony"));
            }

            return(View(sEASONS));
        }
Example #4
0
        public ActionResult Usun_sezon(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SEASONS sEASONS = db.SEASONS.Find(id);

            if (sEASONS == null)
            {
                return(HttpNotFound());
            }
            return(View(sEASONS));
        }