public ActionResult Delete(int id) { try { if (!_tokenManager.GenerateToken()) { return(Json(null, JsonRequestBehavior.AllowGet)); } _IDetalle_Vinculacion_ResolucionApiConsumer.SetAuthHeader(_tokenManager.Token); Detalle_Vinculacion_Resolucion varDetalle_Vinculacion_Resolucion = null; if (id.ToString() != "0") { string where = ""; } var result = _IDetalle_Vinculacion_ResolucionApiConsumer.Delete(id, null, null).Resource; return(Json(result, JsonRequestBehavior.AllowGet)); } catch (ServiceException ex) { return(Json(false, JsonRequestBehavior.AllowGet)); } }
public ActionResult Post(bool IsNew, Detalle_Vinculacion_ResolucionModel varDetalle_Vinculacion_Resolucion) { try { if (ModelState.IsValid) { if (!_tokenManager.GenerateToken()) { return(Json(null, JsonRequestBehavior.AllowGet)); } _IDetalle_Vinculacion_ResolucionApiConsumer.SetAuthHeader(_tokenManager.Token); var result = ""; var Detalle_Vinculacion_ResolucionInfo = new Detalle_Vinculacion_Resolucion { Clave = varDetalle_Vinculacion_Resolucion.Clave , Seleccionar = varDetalle_Vinculacion_Resolucion.Seleccionar , Relacion = varDetalle_Vinculacion_Resolucion.Relacion , idRelacion = varDetalle_Vinculacion_Resolucion.idRelacion }; result = !IsNew? _IDetalle_Vinculacion_ResolucionApiConsumer.Update(Detalle_Vinculacion_ResolucionInfo, null, null).Resource.ToString() : _IDetalle_Vinculacion_ResolucionApiConsumer.Insert(Detalle_Vinculacion_ResolucionInfo, null, null).Resource.ToString(); return(Json(result, JsonRequestBehavior.AllowGet)); } return(Json(false, JsonRequestBehavior.AllowGet)); } catch (ServiceException ex) { return(Json(false, JsonRequestBehavior.AllowGet)); } }