Application is working, register and calculate

This commit is contained in:
2021-02-02 16:25:10 +01:00
parent 3f737a8010
commit 8839d7dff3
9 changed files with 448 additions and 7 deletions

View File

@ -47,9 +47,18 @@ namespace StockDal
", stockMembers);
}
public bool Update(StockMember stockMember)
public void UpdateActPrice(int Id, decimal price)
{
throw new NotImplementedException();
using IDbConnection db = new SqlConnection(StockDBConnection.ConnectionString);
if (db.State == ConnectionState.Closed)
db.Open();
db.Execute(
@"UPDATE [dbo].[StockMember]
SET ActValue = @val,
ActDate = @date
WHERE Id = @id
", new { val = price, date = DateTime.Today, id = Id });
}
IEnumerable<StockMember> IStockMemberRepository.GetStocks()