Handling of Stockprices not delivered

This commit is contained in:
2022-02-09 13:27:23 +01:00
parent f38824becf
commit f5cbe5972e
4 changed files with 2 additions and 1 deletions

View File

@ -146,7 +146,7 @@ namespace BrowserHelper.Extensions
shareCollection.Add(new DiTraderStockRow
{
StockName = colDatas[columnPos["Aktie"]].Text,
LatestPrice = decimal.Parse(colDatas[columnPos["Senast"]].Text),
LatestPrice = decimal.Parse(colDatas[columnPos["Senast"]].Text==""?"-0,1": colDatas[columnPos["Senast"]].Text),
TimeOfDay = TimeSpan.Parse(colDatas[columnPos["Tid"]].Text)
});

View File

@ -59,6 +59,7 @@ namespace StockDAL
public void UpdateActualPrice(int id, decimal price)
{
if (price < 0) return;
using var context = new StockContext();
var entity = (from stk in context.Stocks
where stk.Id == id

Binary file not shown.