public ActionResult Formulario(int id)
        {
            SISECOOBEntities db  = new SISECOOBEntities();
            ProgramasPGOs    pro = db.ProgramasPGOs.FirstOrDefault(i => i.ProgramaPGOID == id);
            ProgramasPGOs    p   = new ProgramasPGOs();

            if (pro != null)
            {
                p.ProgramaPGOID = pro.ProgramaPGOID;
                p.ProgramaPGO   = pro.ProgramaPGO;
            }

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