изменение визита

This commit is contained in:
Галина Федоренко 2024-05-30 03:14:03 +04:00
parent 42f08cd7a1
commit aa8c8c9c06

View File

@ -65,10 +65,11 @@ namespace LawFirmExecutorApp.Controllers
[HttpGet]
public IActionResult UpdateVisit()
{
ViewBag.Hearings = APIClient.GetRequest<List<HearingViewModel>>($"api/hearing/gethearinglist?guarantorid=2");
return View();
}
[HttpPost]
public void UpdateVisit(int id, DateTime date)
public void UpdateVisit(int id, DateTime date, int hearingId)
{
if (APIClient.Executor == null)
{
@ -81,7 +82,7 @@ namespace LawFirmExecutorApp.Controllers
Id = id,
ExecutorId = APIClient.Executor.Id,
VisitDate = date,
HearingId = hearingId,
});
Response.Redirect("/Home/Visits");
}