Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ElectionSymbols electionSymbols = db.electionSymbols.Find(id);

            db.electionSymbols.Remove(electionSymbols);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "ID,symbol")] ElectionSymbols electionSymbols)
 {
     if (ModelState.IsValid)
     {
         db.Entry(electionSymbols).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(electionSymbols));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "ID,symbol")] ElectionSymbols electionSymbols)
        {
            if (ModelState.IsValid)
            {
                db.electionSymbols.Add(electionSymbols);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(electionSymbols));
        }
Esempio n. 4
0
        // GET: ElectionSymbols/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ElectionSymbols electionSymbols = db.electionSymbols.Find(id);

            if (electionSymbols == null)
            {
                return(HttpNotFound());
            }
            return(View(electionSymbols));
        }