public ActionResult DeleteConfirmed(int id) { Wardrobe_Items wardrobe_Items = db.Wardrobe_Items.Find(id); db.Wardrobe_Items.Remove(wardrobe_Items); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ItemID,TypeID,Name,Photo,Color,Season,Occasion")] Wardrobe_Items wardrobe_Items) { if (ModelState.IsValid) { db.Entry(wardrobe_Items).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.TypeID = new SelectList(db.Categorty_Type, "TypeId", "Categories", wardrobe_Items.TypeID); return(View(wardrobe_Items)); }
// GET: Wardrobe_Items/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Wardrobe_Items wardrobe_Items = db.Wardrobe_Items.Find(id); if (wardrobe_Items == null) { return(HttpNotFound()); } return(View(wardrobe_Items)); }
// GET: Wardrobe_Items/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Wardrobe_Items wardrobe_Items = db.Wardrobe_Items.Find(id); if (wardrobe_Items == null) { return(HttpNotFound()); } ViewBag.TypeID = new SelectList(db.Categorty_Type, "TypeId", "Categories", wardrobe_Items.TypeID); return(View(wardrobe_Items)); }