/// <summary> /// An item in the basket list has been swiped. /// If the item was flung then move all instances of the item to the current list /// If the item was justed swiped then move a single item to the current list. /// This may have the same effect depending on the number of instances of the item (its quantity) /// </summary> /// <param name="item"></param> /// <param name="wasFlung"></param> public static int BasketItemSwiped(ListItem item, bool wasFlung) { IListService service = new ListService(); int quantityToMove = (wasFlung == true) ? ( int )item.Quantity : 1; // Remove the specified number of instances from the basket list and add back to the current list service.RemoveItemFromBasketList(item.Id, quantityToMove); service.AddItemToCurrentList(item.ItemId, quantityToMove); return(quantityToMove); }