Nytt sökfönster tillagt, ny metod för att söka betalningar mellan 2 datum

This commit is contained in:
2023-09-06 22:04:24 +02:00
parent 4a8fec1d5f
commit 2b6e48c3ef
11 changed files with 356 additions and 9 deletions

View File

@ -50,6 +50,28 @@ public class AccountRecordRepository : IAccountRecordRepository
return false;
}
public IEnumerable<AccountRecord> GetAllAccBetweenDates(DateTime dateFrom, DateTime dateTo)
{
IEnumerable<AccountRecord> result = null;
using (ApplicationDbContext dc = _dataContext)
{
result = (from acc in dc.AccountRecords
where acc.BetalDatum>dateFrom && acc.BetalDatum <dateTo
orderby acc.Mottagare, acc.BetalDatum descending
select new AccountRecord
{
Id = acc.Id,
BetalDatum = acc.BetalDatum,
Mottagare = acc.Mottagare,
Avisering = acc.Avisering,
Belopp = acc.Belopp,
Konto = acc.Konto,
Stored = acc.Stored
}).ToList();
}
return result;
}
public IEnumerable<AccountRecord> GetAllAccounts()
{
return _dataContext.AccountRecords;