//Удаление товара public void delete(Product product) { if (product == null) { view.NotifyUser("Выберите продукт для удаления."); return; } if (productDao.delete(product.Id)) { cached.Remove(product); view.clearFields(); displayFilteredProducts(); view.NotifyUser("Удаление успешно"); } else { view.NotifyUser("Не удалось удалить товар"); } }