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

            db.ElectionSpecialSeats.Remove(electionspecialseat);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        //
        // GET: /Admin/ElectionSpecialSeat/Details/5

        public ActionResult Details(int id = 0)
        {
            ElectionSpecialSeat electionspecialseat = db.ElectionSpecialSeats.Find(id);

            if (electionspecialseat == null)
            {
                return(HttpNotFound());
            }
            return(View(electionspecialseat));
        }
Ejemplo n.º 3
0
 public ActionResult Edit(ElectionSpecialSeat electionspecialseat)
 {
     if (ModelState.IsValid)
     {
         db.Entry(electionspecialseat).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CommitteeSeatId = new SelectList(db.CommitteeSeats, "Id", "Id", electionspecialseat.CommitteeSeatId);
     ViewBag.ElectionId      = new SelectList(db.Elections, "Id", "Id", electionspecialseat.ElectionId);
     return(View(electionspecialseat));
 }
Ejemplo n.º 4
0
        //
        // GET: /Admin/ElectionSpecialSeat/Edit/5

        public ActionResult Edit(int id = 0)
        {
            ElectionSpecialSeat electionspecialseat = db.ElectionSpecialSeats.Find(id);

            if (electionspecialseat == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CommitteeSeatId = new SelectList(db.CommitteeSeats, "Id", "Id", electionspecialseat.CommitteeSeatId);
            ViewBag.ElectionId      = new SelectList(db.Elections, "Id", "Id", electionspecialseat.ElectionId);
            return(View(electionspecialseat));
        }
Ejemplo n.º 5
0
        public ActionResult Create(ElectionSpecialSeat electionspecialseat)
        {
            if (ModelState.IsValid)
            {
                db.ElectionSpecialSeats.Add(electionspecialseat);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.CommitteeSeatId = new SelectList(db.CommitteeSeats, "Id", "Id", electionspecialseat.CommitteeSeatId);
            ViewBag.ElectionId      = new SelectList(db.Elections, "Id", "Id", electionspecialseat.ElectionId);
            return(View(electionspecialseat));
        }