public ActionResult Formulario(int id)
        {
            SISECOOBEntities db = new SISECOOBEntities();
            TipoEstructura   te = db.TipoEstructura.FirstOrDefault(i => i.EstructuraID == id);
            TipoEstructura   t  = new TipoEstructura();

            if (te != null)
            {
                t.EstructuraID    = te.EstructuraID;
                t.TipoEstructura1 = te.TipoEstructura1;
            }

            return(PartialView("_Formulario", t));
        }
 public JsonResult Edicion(TipoEstructura te)
 {
     try
     {
         te.Editar();
         return(Json(new
         {
             result = true
         }));
     }
     catch (Exception e)
     {
         return(Json(new
         {
             result = false,
             message = e.Message
         }));
     }
 }
 public JsonResult Elimina(int id = 0)
 {
     try
     {
         TipoEstructura te = new TipoEstructura();
         te.Eliminar(id);
         return(Json(new
         {
             result = true
         }));
     }
     catch (Exception e)
     {
         return(Json(new
         {
             result = false,
             message = e.Message
         }));
     }
 }