Merge branch 'main' of http://student.git.athene.tech/shadowik/CourseWork_BankYouBankrupt
This commit is contained in:
commit
c89b4276db
@ -12,7 +12,7 @@
|
||||
|
||||
<form method="post">
|
||||
<div class="row mb-2">
|
||||
<div class="row">Номер счета:</div>
|
||||
<div class="row">Номер карты:</div>
|
||||
<div class="col">
|
||||
<select id="cardId" name="cardId" class="form-control" asp-items="@(new SelectList( @ViewBag.Cards, "Id", "Number"))"></select>
|
||||
</div>
|
||||
|
@ -38,6 +38,7 @@ namespace BankYouBankruptDatabaseImplement.Implements
|
||||
|
||||
return context.Cards
|
||||
.Include(x => x.Client)
|
||||
.Include(x => x.Account)
|
||||
.FirstOrDefault(x => (!string.IsNullOrEmpty(model.Number) && x.Number == model.Number) ||
|
||||
(model.Id.HasValue && x.Id == model.Id))
|
||||
?.GetViewModel;
|
||||
@ -51,7 +52,8 @@ namespace BankYouBankruptDatabaseImplement.Implements
|
||||
{
|
||||
return context.Cards
|
||||
.Include(x => x.Client)
|
||||
.Where(x => x.Number.Contains(model.Number))
|
||||
.Include(x => x.Account)
|
||||
.Where(x => x.Number.Contains(model.Number))
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
@ -60,7 +62,8 @@ namespace BankYouBankruptDatabaseImplement.Implements
|
||||
{
|
||||
return context.Cards
|
||||
.Include(x => x.Client)
|
||||
.Where(x => x.ClientID == model.ClientID)
|
||||
.Include(x => x.Account)
|
||||
.Where(x => x.ClientID == model.ClientID)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
@ -69,14 +72,16 @@ namespace BankYouBankruptDatabaseImplement.Implements
|
||||
{
|
||||
return context.Cards
|
||||
.Include(x => x.Client)
|
||||
.Where(x => x.AccountId == model.AccountId)
|
||||
.Include(x => x.Account)
|
||||
.Where(x => x.AccountId == model.AccountId)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
return context.Cards
|
||||
.Include(x => x.Client)
|
||||
.Select(x => x.GetViewModel)
|
||||
.Include(x => x.Account)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@ -86,7 +91,8 @@ namespace BankYouBankruptDatabaseImplement.Implements
|
||||
|
||||
return context.Cards
|
||||
.Include(x => x.Client)
|
||||
.Select(x => x.GetViewModel)
|
||||
.Include(x => x.Account)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user