fix word report

This commit is contained in:
Zakharov_Rostislav 2024-05-26 21:21:19 +04:00
parent 70e75c8db3
commit 24299f86ce
2 changed files with 12 additions and 11 deletions

View File

@ -117,18 +117,18 @@ namespace BankDatabaseImplement.Implements
using var context = new BankDatabase();
return context.Accounts
.Where(a => model.SelectedAccountIds == null || model.SelectedAccountIds.Contains(a.Id))
.Select(a => new ReportRequestsViewModel()
.Select(account => new ReportRequestsViewModel()
{
AccountNumber = a.Number,
Requests = context.Requests
.Include(x => x.Withdrawal)
.ThenInclude(x => x.Accounts)
.Where(x => x.Withdrawal != null && x.Withdrawal.Accounts
.Select(x => x.AccountId)
.ToList()
.Contains(a.Id))
.Select (r => r.GetViewModel)
.ToList()
AccountNumber = account.Number,
Requests = context.AccountWithdrawals
.Include(x => x.Withdrawal)
.ThenInclude(x => x.Request)
.Where(x => x.AccountId == account.Id)
.Select(x => x.Withdrawal)
.Where(x => x.RequestId != null)
.Select(x => x.Request)
.Select(r => r.GetViewModel)
.ToList(),
})
.ToList();
}

View File

@ -500,6 +500,7 @@ namespace BankManagersClientApp.Controllers
default:
break;
}
Response.Redirect("Index");
}
[HttpGet]