コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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();
        }