private async Task DeleteItemsAsync(IEnumerable <OrderItemModel> models)
 {
     foreach (var model in models)
     {
         await OrderItemService.DeleteOrderItemAsync(model);
     }
 }
Example #2
0
        protected override async Task <bool> DeleteItemAsync(OrderItemModel model)
        {
            try
            {
                StartStatusMessage("Deleting order item...");
                await Task.Delay(100);

                await OrderItemService.DeleteOrderItemAsync(model);

                EndStatusMessage("Order item deleted");
                LogWarning("OrderItem", "Delete", "Order item deleted", $"Order item #{model.OrderID}, {model.OrderLine} was deleted.");
                return(true);
            }
            catch (Exception ex)
            {
                StatusError($"Error deleting Order item: {ex.Message}");
                LogException("OrderItem", "Delete", ex);
                return(false);
            }
        }