示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            statuscomplemento statuscomplemento = db.statuscomplemento.Find(id);

            db.statuscomplemento.Remove(statuscomplemento);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "id,descripcion")] statuscomplemento statuscomplemento)
 {
     if (ModelState.IsValid)
     {
         db.Entry(statuscomplemento).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(statuscomplemento));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "id,descripcion")] statuscomplemento statuscomplemento)
        {
            if (ModelState.IsValid)
            {
                db.statuscomplemento.Add(statuscomplemento);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(statuscomplemento));
        }
示例#4
0
        // GET: statuscomplementoes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            statuscomplemento statuscomplemento = db.statuscomplemento.Find(id);

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