コード例 #1
0
        public void Edit(long inventoryTransferRequestId, [FromBody] MixERP.Net.Entities.Transactions.InventoryTransferRequest inventoryTransferRequest)
        {
            if (inventoryTransferRequest == null)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed));
            }

            try
            {
                this.InventoryTransferRequestRepository.Update(inventoryTransferRequest, inventoryTransferRequestId);
            }
            catch (UnauthorizedException)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.Forbidden));
            }
            catch (MixERPException ex)
            {
                throw new HttpResponseException(new HttpResponseMessage
                {
                    Content    = new StringContent(ex.Message),
                    StatusCode = HttpStatusCode.InternalServerError
                });
            }
            catch
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError));
            }
        }
コード例 #2
0
 public void Get()
 {
     MixERP.Net.Entities.Transactions.InventoryTransferRequest inventoryTransferRequest = Fixture().Get(0);
     Assert.NotNull(inventoryTransferRequest);
 }