Beispiel #1
0
        public void Edit(long nonGlStockTaxDetailId, [FromBody] MixERP.Net.Entities.Transactions.NonGlStockTaxDetail nonGlStockTaxDetail)
        {
            if (nonGlStockTaxDetail == null)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed));
            }

            try
            {
                this.NonGlStockTaxDetailRepository.Update(nonGlStockTaxDetail, nonGlStockTaxDetailId);
            }
            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));
            }
        }
Beispiel #2
0
 public void Get()
 {
     MixERP.Net.Entities.Transactions.NonGlStockTaxDetail nonGlStockTaxDetail = Fixture().Get(0);
     Assert.NotNull(nonGlStockTaxDetail);
 }