public ActionResult GuardarPlantillaDetalle(PlantillaDetaEntity pPlantillaDeta) { string tipoDevol = null; object DataDevol = null; object jsonResponse; try { objPlantillaLogic = new PlantillaLogic(); pPlantillaDeta.segUsuarioEdita = HttpContext.User.Identity.Name; pPlantillaDeta.segUsuarioCrea = HttpContext.User.Identity.Name; pPlantillaDeta.segMaquinaOrigen = GetIPAddress(); if (pPlantillaDeta.Codigo != 0) returnValor = objPlantillaLogic.ActualizarPlantillaDeta(pPlantillaDeta); else returnValor = objPlantillaLogic.RegistrarPlantillaDeta(pPlantillaDeta); DataDevol = returnValor.Message; tipoDevol = returnValor.Exitosa ? "C" : "I"; } catch (Exception ex) { tipoDevol = "E"; log.Error(String.Concat("GuardarPlantillaDetalle", " | ", ex.Message)); DataDevol = ex.Message; } finally { jsonResponse = new { Type = tipoDevol, Data = DataDevol, }; } return Json(jsonResponse, JsonRequestBehavior.AllowGet); }