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

            db.pickers.Remove(pickers);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "id,nombres")] pickers pickers)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pickers).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(pickers));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "id,nombres")] pickers pickers)
        {
            if (ModelState.IsValid)
            {
                db.pickers.Add(pickers);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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