Routine for buying stocks fixed

This commit is contained in:
2022-02-14 08:06:32 +01:00
parent 33640bbd6f
commit aac79f946c
2 changed files with 12 additions and 3 deletions

View File

@ -135,8 +135,10 @@ namespace StockInfoCore
_regWindow.Stocks = _stockMarketRepository.StockMarketList;
Cursor.Current = DefaultCursor;
_regWindow.ShowDialog();
_stockRepository.InsertMany(_regWindow.RegisteredStocks);
if (_regWindow.RegisteredStocks.Count > 0)
{
_stockRepository.InsertMany(_regWindow.RegisteredStocks);
}
ReloadData();
}