Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            BottomsOccasion bottomsOccasion = db.BottomsOccasions.Find(id);

            db.BottomsOccasions.Remove(bottomsOccasion);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "BottomsOccasionID,BottomsOccasionName")] BottomsOccasion bottomsOccasion)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bottomsOccasion).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bottomsOccasion));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "BottomsOccasionID,BottomsOccasionName")] BottomsOccasion bottomsOccasion)
        {
            if (ModelState.IsValid)
            {
                db.BottomsOccasions.Add(bottomsOccasion);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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