Пример #1
0
 public JsonResult GetCP(string id)
 {
     try
     {
         Models.Logica      logica = new Models.Logica();
         Models.DIRECCIONES atri   = logica.codigo(id);
         return(Json(new { status = true, Items = atri }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(new { status = false, message = ex.Message }, JsonRequestBehavior.AllowGet));
     }
 }
Пример #2
0
 public JsonResult GetAuto(string id)
 {
     try
     {
         Models.Logica    logica = new Models.Logica();
         Models.AUTOMOVIL atri   = logica.auto(id);
         return(Json(new { status = true, Items = atri }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(new { status = false, message = ex.Message }, JsonRequestBehavior.AllowGet));
     }
 }
Пример #3
0
        public JsonResult Insert(Models.ADMINISTRADOR ObjContrato)
        {
            try
            {
                Models.Logica model = new Models.Logica();
                model.InsertCoche(ObjContrato);

                return(Json(new { status = true, message = "Exito" }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception)
            {
                return(Json(new { status = false, message = "Ocurrio un Error, vuelva a intentarlo" }, JsonRequestBehavior.AllowGet));
            }
        }