Beispiel #1
0
        public ActionResult DeleteConfirmed(long id)
        {
            TipoIdentifiacion tipoIdentifiacion = db.TipoIdentifiacion.Find(id);

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

            return(View("/Views/Administrativas/TipoIdentifiacions/Create.cshtml", tipoIdentifiacion));
        }
Beispiel #4
0
        // GET: TipoIdentifiacions/Delete/5
        public ActionResult Delete(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TipoIdentifiacion tipoIdentifiacion = db.TipoIdentifiacion.Find(id);

            if (tipoIdentifiacion == null)
            {
                return(HttpNotFound());
            }
            return(View("/Views/Administrativas/TipoIdentifiacions/Delete.cshtml", tipoIdentifiacion));
        }