public ActionResult BuscarPresupuesto(int pID) { string tipoDevol = null; object DataDevol = null; object jsonResponse; try { objPlantillaLogic = new PlantillaLogic(); var registro = objPlantillaLogic.BuscarPresupuesto(pID); tipoDevol = "C"; DataDevol = registro; } catch (Exception ex) { tipoDevol = "E"; DataDevol = ex.Message; } finally { jsonResponse = new { Type = tipoDevol, Data = DataDevol, }; } return Json(jsonResponse); }