public ActionResult Post(bool IsNew, Detalle_de_IndiciosModel varDetalle_de_Indicios) { try { if (ModelState.IsValid) { if (!_tokenManager.GenerateToken()) { return(Json(null, JsonRequestBehavior.AllowGet)); } _IDetalle_de_IndiciosApiConsumer.SetAuthHeader(_tokenManager.Token); var result = ""; var Detalle_de_IndiciosInfo = new Detalle_de_Indicios { Clave = varDetalle_de_Indicios.Clave , Numero_de_Indicio = varDetalle_de_Indicios.Numero_de_Indicio , Nombre_de_Indicio = varDetalle_de_Indicios.Nombre_de_Indicio , Descripcion_de_Indicio = varDetalle_de_Indicios.Descripcion_de_Indicio , Motivo_de_Indicio = varDetalle_de_Indicios.Motivo_de_Indicio , Diligencia = varDetalle_de_Indicios.Diligencia , Ubicacion = varDetalle_de_Indicios.Ubicacion , Estatus = varDetalle_de_Indicios.Estatus }; result = !IsNew? _IDetalle_de_IndiciosApiConsumer.Update(Detalle_de_IndiciosInfo, null, null).Resource.ToString() : _IDetalle_de_IndiciosApiConsumer.Insert(Detalle_de_IndiciosInfo, null, null).Resource.ToString(); return(Json(result, JsonRequestBehavior.AllowGet)); } return(Json(false, JsonRequestBehavior.AllowGet)); } catch (ServiceException ex) { return(Json(false, JsonRequestBehavior.AllowGet)); } }
public ActionResult Delete(int id) { try { if (!_tokenManager.GenerateToken()) { return(Json(null, JsonRequestBehavior.AllowGet)); } _IDetalle_de_IndiciosApiConsumer.SetAuthHeader(_tokenManager.Token); Detalle_de_Indicios varDetalle_de_Indicios = null; if (id.ToString() != "0") { string where = ""; } var result = _IDetalle_de_IndiciosApiConsumer.Delete(id, null, null).Resource; return(Json(result, JsonRequestBehavior.AllowGet)); } catch (ServiceException ex) { return(Json(false, JsonRequestBehavior.AllowGet)); } }