public ActionResult DeleteConfirmed(int id) { TotalPrices2 totalPrices2 = db.TotalPrices2s.Find(id); db.TotalPrices2s.Remove(totalPrices2); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "TotalPrices2ID,UserDecorID,VenueID")] TotalPrices2 totalPrices2) { if (ModelState.IsValid) { db.Entry(totalPrices2).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } // ViewBag.UserDecorID = new SelectList(db.UserDecors, "UserDecorID", "Email", totalPrices2.UserDecorID); ViewBag.VenueID = new SelectList(db.Venues, "VenueID", "VenueName", totalPrices2.VenueID); return(View(totalPrices2)); }
// GET: TotalPrices2/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TotalPrices2 totalPrices2 = db.TotalPrices2s.Find(id); if (totalPrices2 == null) { return(HttpNotFound()); } return(View(totalPrices2)); }
// GET: TotalPrices2/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TotalPrices2 totalPrices2 = db.TotalPrices2s.Find(id); if (totalPrices2 == null) { return(HttpNotFound()); } // ViewBag.UserDecorID = new SelectList(db.UserDecors, "UserDecorID", "Email", totalPrices2.UserDecorID); ViewBag.VenueID = new SelectList(db.Venues, "VenueID", "VenueName", totalPrices2.VenueID); return(View(totalPrices2)); }