public ActionResult BuscarPlantilla(int pID) { string tipoDevol = null; object DataDevol = null; object jsonResponse; try { objPlantillaLogic = new PlantillaLogic(); var registro = objPlantillaLogic.BuscarPlantilla((DateTime.Now.Year) + 1, pID); tipoDevol = "C"; DataDevol = registro; } catch (Exception ex) { tipoDevol = "E"; log.Error(String.Concat("BuscarPlantilla", " | ", ex.Message)); DataDevol = ex.Message; } finally { jsonResponse = new { Type = tipoDevol, Data = DataDevol, }; } return Json(jsonResponse); }