Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            WomensOutfit womensOutfit = db.WomensOutfits.Find(id);

            db.WomensOutfits.Remove(womensOutfit);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "WomensOutfitID,WomensBottomsID,WomensAccessoriesID,WomensShoesID,WomensTopsID")] WomensOutfit womensOutfit)
 {
     if (ModelState.IsValid)
     {
         db.Entry(womensOutfit).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.WomensAccessoriesID = new SelectList(db.WomensAccessories, "WomensAccessoriesID", "Name", womensOutfit.WomensAccessoriesID);
     ViewBag.WomensBottomsID     = new SelectList(db.WomensBottoms, "WomensBottomsID", "Name", womensOutfit.WomensBottomsID);
     ViewBag.WomensShoesID       = new SelectList(db.WomensShoes, "WomensShoesID", "Name", womensOutfit.WomensShoesID);
     ViewBag.WomensTopsID        = new SelectList(db.WomensTops, "WomensTopsID", "Name", womensOutfit.WomensTopsID);
     return(View(womensOutfit));
 }
Ejemplo n.º 3
0
        // GET: WomensOutfits/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WomensOutfit womensOutfit = db.WomensOutfits.Find(id);

            if (womensOutfit == null)
            {
                return(HttpNotFound());
            }
            return(View(womensOutfit));
        }
Ejemplo n.º 4
0
        // GET: WomensOutfits/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WomensOutfit womensOutfit = db.WomensOutfits.Find(id);

            if (womensOutfit == null)
            {
                return(HttpNotFound());
            }
            ViewBag.WomensAccessoriesID = new SelectList(db.WomensAccessories, "WomensAccessoriesID", "Name", womensOutfit.WomensAccessoriesID);
            ViewBag.WomensBottomsID     = new SelectList(db.WomensBottoms, "WomensBottomsID", "Name", womensOutfit.WomensBottomsID);
            ViewBag.WomensShoesID       = new SelectList(db.WomensShoes, "WomensShoesID", "Name", womensOutfit.WomensShoesID);
            ViewBag.WomensTopsID        = new SelectList(db.WomensTops, "WomensTopsID", "Name", womensOutfit.WomensTopsID);
            return(View(womensOutfit));
        }