Prepared for stock edit function + corrected bug , "not possible to buy new stock"!
This commit is contained in:
@ -57,9 +57,23 @@ namespace StockInfoCore
|
||||
var stockSold = _stockRepository.LatestSell(stockChosen.StockName.Trim());
|
||||
if (stockSold != null)
|
||||
{
|
||||
txtLatestSoldDate.Text = stockSold.LatestSoldDate.Value.ToString();
|
||||
txtLatestSoldPrice.Text = stockSold.SoldStockPrice.ToString();
|
||||
if (stockSold.LatestSoldDate != null)
|
||||
{
|
||||
txtLatestSoldDate.Text = stockSold.LatestSoldDate.Value.ToString();
|
||||
txtLatestSoldPrice.Text = stockSold.SoldStockPrice.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
txtLatestSoldDate.Text = string.Empty;
|
||||
txtLatestSoldPrice.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
txtLatestSoldDate.Text = string.Empty;
|
||||
txtLatestSoldPrice.Text = string.Empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void btnSaveStock_Click(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user