Ejemplo n.º 1
0
 //
 // GET: /tSeat/Create
 public ActionResult Create(int id)
 {
     tSection section = db.tSection.Find(id);
     tSeat seat = new tSeat();
     seat.tSectionId = section.tSectionId;
     return View(seat);
 }
Ejemplo n.º 2
0
        public ActionResult Create(tSeat seat)
        {
            if (ModelState.IsValid)
            {
                db.tSeat.Add(seat);
                db.SaveChanges();

                return RedirectToAction("List", new { id = seat.tSectionId });
            }
            return View(seat);
        }
Ejemplo n.º 3
0
        public ActionResult Edit(tSeat seat)
        {
            if (ModelState.IsValid)
            {
            db.Entry(seat).State = EntityState.Modified;
            db.SaveChanges();
            return RedirectToAction("List", new { id = seat.tSectionId });
            }

            return View(seat);
        }