[Fix #12] Excel-Import: Show a message with number of imported sellers

This commit is contained in:
Martin Brodbeck 2019-02-25 09:26:21 +01:00
parent 2fb42d5365
commit 32da117468
3 changed files with 16 additions and 4 deletions

View file

@ -6,7 +6,7 @@
namespace fs = std::filesystem;
void ExcelReader::readSellersFromFile(const fs::path& filePath, Marketplace* market)
std::size_t ExcelReader::readSellersFromFile(const fs::path& filePath, Marketplace* market)
{
xlnt::workbook wb;
std::ifstream mystream(filePath, std::ios::binary);
@ -63,4 +63,6 @@ void ExcelReader::readSellersFromFile(const fs::path& filePath, Marketplace* mar
market->sortSellers();
market->storeToDb();
return market->getSellers().size() - 1; // minus 1 because we don't count the "special" seller
}

View file

@ -12,7 +12,7 @@
class ExcelReader
{
public:
static void readSellersFromFile(const std::filesystem::path& filePath, Marketplace* market);
static std::size_t readSellersFromFile(const std::filesystem::path& filePath, Marketplace* market);
};
#endif