public void UpdatePriceCartList(string itemName) { foreach (var tempItem in CartItemList) { if (tempItem.Name == itemName) { CartItemList.Remove(tempItem); tempItem.IsChecked = false; if (viewVisible == Visibility.Visible) { BuyingOffer(); } return; } } foreach (var tempItem in ItemList) { if (tempItem.Name == itemName) { Item item = CreatCartM.GetItemsByName(itemName).FirstOrDefault(); tempItem.Description = item.Description; tempItem.ImagePath = item.ImagePath; tempItem.CheapestBranch = CreatCartM.GetCheapestBranch(itemName); tempItem.IsChecked = true; CartItemList.Add(tempItem); BuyingOffer(); } } }
public void RemoveItem(Cart_itemModel cart_itemModel) { CartItemList.Remove(cart_itemModel); }