Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ticket_sales ticket_sales = db.ticket_sales.Find(id);

            db.ticket_sales.Remove(ticket_sales);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ticket_id,ticket_type_id,sale_date,redemption_date,theme_park_id,sale_location")] ticket_sales ticket_sales)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ticket_sales).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.theme_park_id  = new SelectList(db.theme_park, "theme_park_id", "theme_park_name", ticket_sales.theme_park_id);
     ViewBag.ticket_type_id = new SelectList(db.ticket_types, "ticket_type_id", "ticket_name", ticket_sales.ticket_type_id);
     return(View(ticket_sales));
 }
Ejemplo n.º 3
0
        // GET: TicketSaleAdmin/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ticket_sales ticket_sales = db.ticket_sales.Find(id);

            if (ticket_sales == null)
            {
                return(HttpNotFound());
            }
            return(View(ticket_sales));
        }
Ejemplo n.º 4
0
        // GET: TicketSaleAdmin/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ticket_sales ticket_sales = db.ticket_sales.Find(id);

            if (ticket_sales == null)
            {
                return(HttpNotFound());
            }
            ViewBag.theme_park_id  = new SelectList(db.theme_park, "theme_park_id", "theme_park_name", ticket_sales.theme_park_id);
            ViewBag.ticket_type_id = new SelectList(db.ticket_types, "ticket_type_id", "ticket_name", ticket_sales.ticket_type_id);
            return(View(ticket_sales));
        }