po
This commit is contained in:
parent
e19ee5e3f4
commit
d98e21109d
@ -162,7 +162,7 @@ namespace ZooClientApp.Controllers
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
ViewBag.Preserves = APIClient.GetRequest<List<PreserveViewModel>>($"api/preserve/getpreserves?clientid={APIClient.Client.Id}");
|
||||
ViewBag.Preserves = APIClient.GetRequest<List<PreserveViewModel>>($"api/preserve/getpreserves");
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
|
@ -23,10 +23,6 @@ namespace ZooDataBaseImplement.Implements
|
||||
public List<PreserveViewModel> GetFilteredList(PreserveSearchModel
|
||||
model)
|
||||
{
|
||||
if (string.IsNullOrEmpty(model.PreserveName))
|
||||
{
|
||||
return new();
|
||||
}
|
||||
using var context = new ZooDatabase();
|
||||
return context.Preserves.Where(x => x.EmployeeId == model.EmployeeId)
|
||||
.Where(x => String.IsNullOrEmpty(model.PreserveName) || x.PreserveName.Contains(model.PreserveName))
|
||||
|
@ -0,0 +1,22 @@
|
||||
@{
|
||||
ViewData["Title"] = "UpdatePreserve";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Редактирование животного</h2>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Животное:</div>
|
||||
<div class="col-8">
|
||||
<select id="pet" name="name" class="form-control" asp-items="@(new SelectList(@ViewBag.Preserves, "Id", "PreserveName"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Возраст:</div>
|
||||
<div class="col-8"><input type="text" name="price" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Сохранить" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
</form>
|
Loading…
Reference in New Issue
Block a user