public ActionResult Post_Datos_Generales(areas_Empresas_Datos_GeneralesModel varareas_Empresas) { try { if (!_tokenManager.GenerateToken()) { return(Json(null, JsonRequestBehavior.AllowGet)); } _Iareas_EmpresasApiConsumer.SetAuthHeader(_tokenManager.Token); var result = ""; var areas_Empresas_Datos_GeneralesInfo = new areas_Empresas_Datos_Generales { Clave = varareas_Empresas.Clave , Nombre = varareas_Empresas.Nombre }; result = _Iareas_EmpresasApiConsumer.Update_Datos_Generales(areas_Empresas_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(areas_Empresas_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)); } }