public void UpdateIsRequestedProductionOrder(List <string> productionOrderIds, string context) { string productionOrderUri; if (context == "DELETE") { productionOrderUri = "sales/production-orders/update-requested-false"; } else { productionOrderUri = "sales/production-orders/update-requested-true"; } _ = new { context, ids = productionOrderIds }; IHttpServiceRepository httpClient = (IHttpServiceRepository)_serviceProvider.GetService(typeof(IHttpServiceRepository)); var response = httpClient.PutAsync($"{APIEndpoint.Sales}{productionOrderUri}", new StringContent(JsonConvert.SerializeObject(productionOrderIds).ToString(), Encoding.UTF8, General.JsonMediaType)).Result; response.EnsureSuccessStatusCode(); }
public void UpdateIsCompletedProductionOrder(string productionOrderId) { string productionOrderUri = "sales/production-orders/update-iscompleted-true"; IHttpServiceRepository httpClient = (IHttpServiceRepository)this._serviceProvider.GetService(typeof(IHttpServiceRepository)); var response = httpClient.PutAsync($"{APIEndpoint.Sales}{productionOrderUri}", new StringContent(productionOrderId, Encoding.UTF8, General.JsonMediaType)).Result; response.EnsureSuccessStatusCode(); }
public void UpdateDistributedQuantityProductionOrder(List <SppParams> contextAndIds) { string productionOrderUri = "sales/production-orders/update-distributed-quantity"; _ = new { data = contextAndIds }; IHttpServiceRepository httpClient = (IHttpServiceRepository)this._serviceProvider.GetService(typeof(IHttpServiceRepository)); var response = httpClient.PutAsync($"{APIEndpoint.Sales}{productionOrderUri}", new StringContent(JsonConvert.SerializeObject(contextAndIds).ToString(), Encoding.UTF8, General.JsonMediaType)).Result; response.EnsureSuccessStatusCode(); }