Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SeasonParts seasonParts = db.SeasonParts.Find(id);

            db.SeasonParts.Remove(seasonParts);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "Id,SeasonPartName")] SeasonParts seasonParts)
 {
     if (ModelState.IsValid)
     {
         db.Entry(seasonParts).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(seasonParts));
 }
Exemple #3
0
        public ActionResult Create([Bind(Include = "Id,SeasonPartName")] SeasonParts seasonParts)
        {
            if (ModelState.IsValid)
            {
                db.SeasonParts.Add(seasonParts);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(seasonParts));
        }
Exemple #4
0
        // GET: SeasonParts/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SeasonParts seasonParts = db.SeasonParts.Find(id);

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