public ActionResult Post_Datos_Generales(Motivos_Datos_GeneralesModel varMotivos) { try { if (!_tokenManager.GenerateToken()) { return(Json(null, JsonRequestBehavior.AllowGet)); } _IMotivosApiConsumer.SetAuthHeader(_tokenManager.Token); var result = ""; var Motivos_Datos_GeneralesInfo = new Motivos_Datos_Generales { Clave = varMotivos.Clave , Descripcion = varMotivos.Descripcion }; result = _IMotivosApiConsumer.Update_Datos_Generales(Motivos_Datos_GeneralesInfo).Resource.ToString(); Session["KeyValueInserted"] = result; return(Json(result, JsonRequestBehavior.AllowGet)); } catch (ServiceException ex) { return(Json(false, JsonRequestBehavior.AllowGet)); } }
public ApiResponse <int> Update_Datos_Generales(Motivos_Datos_Generales entity) { try { var result = RestApiHelper.InvokeApi <int>(baseApi, ApiControllerUrl + "/Put_Datos_Generales", Method.PUT, ApiHeader, entity); return(new ApiResponse <int>(true, result)); } catch (Exception ex) { return(new ApiResponse <int>(false, -1)); } }