private void CreditOnOffProduct(string command, bool productState) { ProductCatalog productList = new ProductCatalog(); Product product = stregsystem.GetProduct(command); product.CanBeBoughtOnCredit = productState; if (productList.UpdateProduct(product)) { cli.DisplayCreditOnOffProduct(product, productState); } }
private void ActiveDeactiveProduct(string command, bool productState) { ProductCatalog productList = new ProductCatalog(); Product product = stregsystem.GetProduct(command); product.Active = productState; if (productList.UpdateProduct(product)) { cli.DisplayActiveDeactiveProduct(product, productState); } }