예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ticket_selling ticket_selling = db.ticket_selling.Find(id);

            db.ticket_selling.Remove(ticket_selling);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "id_ticket,date_of_sale,associate_id,ticket_selling_id")] ticket_selling ticket_selling)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ticket_selling).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.associate_id = new SelectList(db.associate, "associate_id", "age", ticket_selling.associate_id);
     ViewBag.id_ticket    = new SelectList(db.ticket, "ticket_id", "row", ticket_selling.id_ticket);
     return(View(ticket_selling));
 }
예제 #3
0
        // GET: ticket_selling/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ticket_selling ticket_selling = db.ticket_selling.Find(id);

            if (ticket_selling == null)
            {
                return(HttpNotFound());
            }
            return(View(ticket_selling));
        }
예제 #4
0
        // GET: ticket_selling/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ticket_selling ticket_selling = db.ticket_selling.Find(id);

            if (ticket_selling == null)
            {
                return(HttpNotFound());
            }
            ViewBag.associate_id = new SelectList(db.associate, "associate_id", "age", ticket_selling.associate_id);
            ViewBag.id_ticket    = new SelectList(db.ticket, "ticket_id", "row", ticket_selling.id_ticket);
            return(View(ticket_selling));
        }