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