public ActionResult DeleteConfirmed(int id)
        {
            LeisureOutfit leisureOutfit = db.LeisureOutfits.Find(id);

            db.LeisureOutfits.Remove(leisureOutfit);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        // GET: LeisureOutfits/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LeisureOutfit leisureOutfit = db.LeisureOutfits.Find(id);

            if (leisureOutfit == null)
            {
                return(HttpNotFound());
            }
            return(View(leisureOutfit));
        }
 public ActionResult Edit([Bind(Include = "LeisureOutfitID,MainOutfitID,LeisureTopID,LeisureBottomID,LeisureShoesID,LeisureAccessoryID")] LeisureOutfit leisureOutfit)
 {
     if (ModelState.IsValid)
     {
         db.Entry(leisureOutfit).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.LeisureAccessoryID = new SelectList(db.LeisureAccessories, "LeisureAccessoryID", "LeisureAccessoryName", leisureOutfit.LeisureAccessoryID);
     ViewBag.LeisureBottomID    = new SelectList(db.LeisureBottoms, "LeisureBottomID", "LeisureBottomName", leisureOutfit.LeisureBottomID);
     ViewBag.LeisureShoesID     = new SelectList(db.LeisureShoes, "LeisureShoesID", "LeisureShoesName", leisureOutfit.LeisureShoesID);
     ViewBag.LeisureTopID       = new SelectList(db.LeisureTops, "LeisureTopID", "LeisureTopName", leisureOutfit.LeisureTopID);
     ViewBag.MainOutfitID       = new SelectList(db.Outfits, "MainOutfitID", "OutfitName", leisureOutfit.MainOutfitID);
     return(View(leisureOutfit));
 }
        // GET: LeisureOutfits/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LeisureOutfit leisureOutfit = db.LeisureOutfits.Find(id);

            if (leisureOutfit == null)
            {
                return(HttpNotFound());
            }
            ViewBag.LeisureAccessoryID = new SelectList(db.LeisureAccessories, "LeisureAccessoryID", "LeisureAccessoryName", leisureOutfit.LeisureAccessoryID);
            ViewBag.LeisureBottomID    = new SelectList(db.LeisureBottoms, "LeisureBottomID", "LeisureBottomName", leisureOutfit.LeisureBottomID);
            ViewBag.LeisureShoesID     = new SelectList(db.LeisureShoes, "LeisureShoesID", "LeisureShoesName", leisureOutfit.LeisureShoesID);
            ViewBag.LeisureTopID       = new SelectList(db.LeisureTops, "LeisureTopID", "LeisureTopName", leisureOutfit.LeisureTopID);
            ViewBag.MainOutfitID       = new SelectList(db.Outfits, "MainOutfitID", "OutfitName", leisureOutfit.MainOutfitID);
            return(View(leisureOutfit));
        }