Esempio n. 1
0
        public void Edit(OrderDetail orderDetail)
        {
            try
            {
                var bo = new OrderDetailBusiness();
                orderDetail.ChangedOn = System.DateTime.Now;
                bo.Edit(orderDetail);
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message
                };

                throw new HttpResponseException(httpError);
            }
        }
Esempio n. 2
0
        public void Edit(OrderDetail orderDetail)
        {
            try
            {
                if (orderDetail == null)
                {
                    throw new Exception("Object can not be null!");
                }

                var odb = new OrderDetailBusiness();
                odb.Edit(orderDetail);
            }
            catch (Exception ex)
            {
                var httpError = new HttpResponseMessage()
                {
                    StatusCode   = (HttpStatusCode)422,
                    ReasonPhrase = ex.Message,
                    Content      = new StringContent(ex.Message),
                };

                throw new HttpResponseException(httpError);
            }
        }
 public void Edit(OrderDetail orderDetail)
 {
     business.Edit(orderDetail);
 }