private void DeleteBasketItem() { BasketItems.Remove(_selectedItem); OnPropertyChanged("HeightSelectedItem"); UpdateDiscount(); UpdateTotalPrice(); }
public void OnDeleteClickCommand(object obj) { if (!(obj is BasketItem item)) { return; } BasketItems.Remove(item); }
private void BasketItemsChanged(Product removedItem) { BasketItems.Remove(removedItem); RaisePropertyChanged("BasketItems"); if (Products.Any(p => p.Id == removedItem.Id)) { Products.Single(p => p.Id == removedItem.Id).Stock++; RaisePropertyChanged("Products"); } }
private void RemoveFromBasketCommandExecute(object obj) { BasketItems.Remove(SelectedBasketItem); }