public ActionResult PotwierdzenieUsunieciaSe(int id) { SEASONS sEASONS = db.SEASONS.Find(id); db.SEASONS.Remove(sEASONS); db.SaveChanges(); return(RedirectToAction("Sezony")); }
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)); }
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)); }
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)); }