Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            WomensBottom womensBottom = db.WomensBottoms.Find(id);

            db.WomensBottoms.Remove(womensBottom);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "WomensBottomsID,Name,Photo,Type,Color,Season,Occasion")] WomensBottom womensBottom)
 {
     if (ModelState.IsValid)
     {
         db.Entry(womensBottom).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(womensBottom));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "WomensBottomsID,Name,Photo,Type,Color,Season,Occasion")] WomensBottom womensBottom)
        {
            if (ModelState.IsValid)
            {
                db.WomensBottoms.Add(womensBottom);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(womensBottom));
        }
Esempio n. 4
0
        // GET: WomensBottoms/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WomensBottom womensBottom = db.WomensBottoms.Find(id);

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