public ActionResult DeleteConfirmed(int id)
        {
            ClothingMain clothingMain = db.ClothingMains.Find(id);

            db.ClothingMains.Remove(clothingMain);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ClothingID,TopsID,BottomsID,ShoesID,AccessoriesID")] ClothingMain clothingMain)
 {
     if (ModelState.IsValid)
     {
         db.Entry(clothingMain).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AccessoriesID = new SelectList(db.AccessoriesStuffs, "AccessoriesID", "Name", clothingMain.AccessoriesID);
     ViewBag.BottomsID     = new SelectList(db.BottomStuffs, "BottomID", "Name", clothingMain.BottomsID);
     ViewBag.ShoesID       = new SelectList(db.ShoeStuffs, "ShoeID", "Name", clothingMain.ShoesID);
     ViewBag.TopsID        = new SelectList(db.TopStuffs, "TopsID", "Name", clothingMain.TopsID);
     return(View(clothingMain));
 }
        // GET: ClothingMains/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClothingMain clothingMain = db.ClothingMains.Find(id);

            if (clothingMain == null)
            {
                return(HttpNotFound());
            }
            return(View(clothingMain));
        }
        // GET: ClothingMains/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClothingMain clothingMain = db.ClothingMains.Find(id);

            if (clothingMain == null)
            {
                return(HttpNotFound());
            }
            ViewBag.AccessoriesID = new SelectList(db.AccessoriesStuffs, "AccessoriesID", "Name", clothingMain.AccessoriesID);
            ViewBag.BottomsID     = new SelectList(db.BottomStuffs, "BottomID", "Name", clothingMain.BottomsID);
            ViewBag.ShoesID       = new SelectList(db.ShoeStuffs, "ShoeID", "Name", clothingMain.ShoesID);
            ViewBag.TopsID        = new SelectList(db.TopStuffs, "TopsID", "Name", clothingMain.TopsID);
            return(View(clothingMain));
        }