Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            c_institucion c_institucion = db.c_institucion.Find(id);

            db.c_institucion.Remove(c_institucion);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "id_institucion,cl_institucion,nb_institucion")] c_institucion c_institucion)
 {
     if (ModelState.IsValid)
     {
         db.Entry(c_institucion).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(c_institucion));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "id_institucion,cl_institucion,nb_institucion")] c_institucion c_institucion)
        {
            if (ModelState.IsValid)
            {
                db.c_institucion.Add(c_institucion);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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