public static bool removeProduct(string username, string storeName, string productName, string manufacturer) { aUser temp = getUser(username); if (temp == null) { return(false); } return(temp.removeProduct(storeName, productName, manufacturer)); }
public static bool removeProduct(string username, string storeName, string manufacturer, Dictionary <string, int> product) { aUser temp = getUser(username); if (temp == null) { return(false); } Store store = browseStore(username, storeName); if (store == null) { return(false); } ShoppingBasket basket = new ShoppingBasket(store, temp); foreach (string pName in product.Keys) { Product p1 = Stores.searchStore(storeName).searchProduct(pName, manufacturer); basket.addProduct(p1); } return(temp.removeProduct(basket)); }