Summering av sökta transaktioner

This commit is contained in:
2024-02-09 23:51:56 +01:00
parent a215b54d0d
commit a16137072b
5 changed files with 60 additions and 24 deletions

View File

@ -40,6 +40,7 @@ namespace WinFormDiApp
private void btnStartSearch_Click(object sender, EventArgs e)
{
double SearchedSum = 0;
flpPanel1.Controls.Clear();
foundRecs = _accountRecordRepository.GetAllAccBetweenDates(dtpFrom.Value, dtpTo.Value);
if (foundRecs.Any())
@ -48,8 +49,10 @@ namespace WinFormDiApp
foreach (var account in aggregates)
{
var ucCustV = createAndFillUCcv(account);
SearchedSum += Convert.ToDouble(ucCustV.Amount);
flpPanel1.Controls.Add(ucCustV);
}
txtSoekSumma.Text=SearchedSum.ToString();
}
else
{