示例#1
0
        public async Task <List <Delivery> > DeleteDeliveryAsync(List <Delivery> listDelivery)
        {
            List <Delivery> result = new List <Delivery>();

            checkServiceCommunication();
            List <Delivery> gateWayResultList = await _gatewayOrder.DeleteDeliveryAsync(listDelivery);

            if (gateWayResultList.Count == 0)
            {
                foreach (Delivery delivery in listDelivery)
                {
                    int returnValue = _dataSet.DeleteDelivery(delivery.ID);
                    if (returnValue > 0)
                    {
                        result.Add(delivery);
                    }
                }
            }
            return(result);
        }