public ActionResult Post(bool IsNew, Detalle_del_IndicioModel varDetalle_del_Indicio) { try { if (ModelState.IsValid) { if (!_tokenManager.GenerateToken()) { return(Json(null, JsonRequestBehavior.AllowGet)); } _IDetalle_del_IndicioApiConsumer.SetAuthHeader(_tokenManager.Token); var result = ""; var Detalle_del_IndicioInfo = new Detalle_del_Indicio { Clave = varDetalle_del_Indicio.Clave , Numero_de_Indicio = varDetalle_del_Indicio.Numero_de_Indicio , Nombre_del_Indicio = varDetalle_del_Indicio.Nombre_del_Indicio , Descripcion_del_Indicio = varDetalle_del_Indicio.Descripcion_del_Indicio , Motivo = varDetalle_del_Indicio.Motivo , Estatus = varDetalle_del_Indicio.Estatus , Ubicacion_de_Indicio = varDetalle_del_Indicio.Ubicacion_de_Indicio }; result = !IsNew? _IDetalle_del_IndicioApiConsumer.Update(Detalle_del_IndicioInfo, null, null).Resource.ToString() : _IDetalle_del_IndicioApiConsumer.Insert(Detalle_del_IndicioInfo, 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_del_IndicioApiConsumer.SetAuthHeader(_tokenManager.Token); Detalle_del_Indicio varDetalle_del_Indicio = null; if (id.ToString() != "0") { string where = ""; } var result = _IDetalle_del_IndicioApiConsumer.Delete(id, null, null).Resource; return(Json(result, JsonRequestBehavior.AllowGet)); } catch (ServiceException ex) { return(Json(false, JsonRequestBehavior.AllowGet)); } }