Ejemplo n.º 1
0
        public ErrorCodes UpdateDeliveryPrice(int orderId, string user, int deliveryPrice)
        {
            ErrorCodes errorCodes = ErrorCodes.Success;

            try
            {
                var deliveryStatus = (short)DeliveryStatus.CallAnotherShipping;
                var result         = _orderDal.UpdateDeliveryPrice(orderId, user, deliveryPrice, deliveryStatus);


                if (result <= 0)
                {
                    errorCodes = ErrorCodes.BusinessError;
                }
                else
                {
                    _orderHistoryBo.Insert(new OrderHistory
                    {
                        change_log      = "CallAnotherShipping",
                        created_by      = user,
                        order_id        = orderId,
                        delivery_status = deliveryStatus
                    });
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                errorCodes = ErrorCodes.Exception;
            }
            return(errorCodes);
        }