public ActionResult DeleteConfirmed(int id) { Customer_Event customer_Event = db.Customer_Event.Find(id); db.Customer_Event.Remove(customer_Event); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Customer_Event_ID,Customer_Event_Name,Customer_Event_Surname,Customer_Event_Email,Number_of_tickects,TicketFee_Date,TicketFee_Total,Event_ID,Payment_Type_ID")] Customer_Event customer_Event) { if (ModelState.IsValid) { db.Entry(customer_Event).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Event_ID = new SelectList(db.Event_, "Event_ID", "Event_Name", customer_Event.Event_ID); ViewBag.Payment_Type_ID = new SelectList(db.Payment_Type, "Payment_Type_ID", "Payment_Type_Name", customer_Event.Payment_Type_ID); return(View(customer_Event)); }
// GET: Customer_Event/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Customer_Event customer_Event = db.Customer_Event.Find(id); if (customer_Event == null) { return(HttpNotFound()); } return(View(customer_Event)); }
// GET: Customer_Event/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Customer_Event customer_Event = db.Customer_Event.Find(id); if (customer_Event == null) { return(HttpNotFound()); } ViewBag.Event_ID = new SelectList(db.Event_, "Event_ID", "Event_Name", customer_Event.Event_ID); ViewBag.Payment_Type_ID = new SelectList(db.Payment_Type, "Payment_Type_ID", "Payment_Type_Name", customer_Event.Payment_Type_ID); return(View(customer_Event)); }