public ActionResult Post(bool IsNew, Otras_Identificaciones_InvolucradoModel varOtras_Identificaciones_Involucrado) { try { if (ModelState.IsValid) { if (!_tokenManager.GenerateToken()) { return(Json(null, JsonRequestBehavior.AllowGet)); } _IOtras_Identificaciones_InvolucradoApiConsumer.SetAuthHeader(_tokenManager.Token); var result = ""; var Otras_Identificaciones_InvolucradoInfo = new Otras_Identificaciones_Involucrado { Clave = varOtras_Identificaciones_Involucrado.Clave , Tipo_de_identificacion = varOtras_Identificaciones_Involucrado.Tipo_de_identificacion , Descripcion = varOtras_Identificaciones_Involucrado.Descripcion }; result = !IsNew? _IOtras_Identificaciones_InvolucradoApiConsumer.Update(Otras_Identificaciones_InvolucradoInfo, null, null).Resource.ToString() : _IOtras_Identificaciones_InvolucradoApiConsumer.Insert(Otras_Identificaciones_InvolucradoInfo, 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)); } _IOtras_Identificaciones_InvolucradoApiConsumer.SetAuthHeader(_tokenManager.Token); Otras_Identificaciones_Involucrado varOtras_Identificaciones_Involucrado = null; if (id.ToString() != "0") { string where = ""; } var result = _IOtras_Identificaciones_InvolucradoApiConsumer.Delete(id, null, null).Resource; return(Json(result, JsonRequestBehavior.AllowGet)); } catch (ServiceException ex) { return(Json(false, JsonRequestBehavior.AllowGet)); } }